fixed crash on layout adding when jrugr is running
[jrugr.git] / src / jrugrconfui.h
blob8cc2f4cd55e8064709c241b8a0cdee195a205f6e
1 ////////////////////////////////////////
2 // Copyright : GPL //
3 ////////////////////////////////////////
4 #ifndef JRUGRCONFIG_H
5 #define JRUGRCONFIG_H
7 #include "jrugrdefs.h"
8 #include "x11tools.h"
9 #include "datamodels.h"
10 #include "ui_configwin.h"
13 class JrugrConfigForm : public QDialog {
14 Q_OBJECT
16 public:
17 JrugrConfigForm (const QString &optFileName, QWidget *parent=0);
18 ~JrugrConfigForm ();
20 void getHotKeys (XEvent *event);
21 void clearHotKeys ();
23 protected:
24 void closeEvent (QCloseEvent *event);
26 signals:
27 void saveConfig ();
29 public slots:
30 void addLayout ();
31 void delLayout ();
32 void srcClick (QModelIndex index);
33 void dstClick ();
34 void comboModelCh (int index);
35 void comboVariantCh (int index);
36 void statSelect (bool check);
37 void apply ();
38 void setFlagUse ();
39 void setMPHack ();
40 void layoutUp ();
41 void layoutDown ();
42 void updateOptionsCommand ();
43 void xkbOptionsChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight);
44 void statSwitching (bool checked);
46 private:
47 bool loadRules ();
48 void setCmdLine ();
49 bool setStat ();
50 void initXKBTab ();
51 int getSelectedDstLayout ();
53 private:
54 Ui_ConfigForm cfgUI;
56 private:
57 QString mTheme;
58 QStringList mModelList;
59 RulesInfo *mCurRule;
60 SrcLayoutModel *mSrcLayoutModel;
61 DstLayoutModel *mDstLayoutModel;
62 XkbOptionsModel *mXkbOptionsModel;
63 JrugrCfg *mJCfg;
64 QList<XkbVariant> mVariants;
65 QString mIcoPath;
66 QString mKey;
67 QString mMods;
68 QString mHotKeys;
69 QString mCfgFileName;
73 #endif