[Feature] Improve uri handling.
[Khopper.git] / plugins / cuesheet / codecselector.hpp
blob8dfb165e4ef5f16a1e2d4a57a1586c2883ed47b8
1 /**
2 * @file codecselector.hpp
3 * @author Wei-Cheng Pan
5 * Copyright (C) 2008 Wei-Cheng Pan <legnaleurc@gmail.com>
7 * This file is part of Khopper.
9 * Khopper is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
14 * Khopper is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef KHOPPER_WIDGET_CODECSELECTOR_HPP
23 #define KHOPPER_WIDGET_CODECSELECTOR_HPP
25 #include <QtGui/QDialog>
27 #include <memory>
29 namespace Ui {
30 class CodecSelector;
33 namespace khopper {
35 namespace widget {
37 /**
38 * @brief Decode string dialog
40 class CodecSelector : public QDialog {
41 Q_OBJECT
43 public:
44 static QString selectTextCodec( const QByteArray & encoded );
46 private slots:
47 void update_( int );
49 private:
50 /**
51 * @brief Default constructor
52 * @param parent Parent widget
53 * @param f Window flags
55 explicit CodecSelector( const QByteArray & encoded );
57 std::shared_ptr< Ui::CodecSelector > ui_;
58 QByteArray encoded_;
59 QString decoded_;
66 #endif