1 /***************************************************************************
2  *   Copyright (C) 2013~2013 by CSSlayer                                   *
3  *   wengxt@gmail.com                                                      *
4  *                                                                         *
5  *  This program is free software: you can redistribute it and/or modify   *
6  *  it under the terms of the GNU General Public License as published by   *
7  *  the Free Software Foundation, either version 3 of the License, or      *
8  *  (at your option) any later version.                                    *
9  *                                                                         *
10  *  This program is distributed in the hope that it will be useful,        *
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
13  *  GNU General Public License for more details.                           *
14  *                                                                         *
15  *  You should have received a copy of the GNU General Public License      *
16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
17  *                                                                         *
18  ***************************************************************************/
19 
20 #ifndef FCITX_SKK_GUI_DICTWIDGET_H
21 #define FCITX_SKK_GUI_DICTWIDGET_H
22 
23 #include <fcitxqtconfiguiwidget.h>
24 
25 class RuleModel;
26 class DictModel;
27 namespace Ui {
28 class SkkDictWidget;
29 }
30 
31 class SkkDictWidget : public FcitxQtConfigUIWidget
32 {
33     Q_OBJECT
34 public:
35     explicit SkkDictWidget(QWidget* parent = 0);
36     virtual ~SkkDictWidget();
37 
38     virtual void load();
39     virtual void save();
40     virtual QString title();
41     virtual QString addon();
42     virtual QString icon();
43 
44 private Q_SLOTS:
45     void addDictClicked();
46     void defaultDictClicked();
47     void removeDictClicked();
48     void moveUpDictClicked();
49     void moveDownClicked();
50     void ruleChanged(int);
51 private:
52     Ui::SkkDictWidget* m_ui;
53     DictModel* m_dictModel;
54     RuleModel* m_ruleModel;
55 };
56 
57 
58 #endif // FCITX_SKK_GUI_DICTWIDGET_H
59