00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef _QEDIT_CONFIG_H_
00017 #define _QEDIT_CONFIG_H_
00018
00019 #include "qce-config.h"
00020
00028 #include "ui_editconfig.h"
00029
00030 #include <QWidget>
00031
00032 class QCE_EXPORT QEditConfig : public QWidget, private Ui::EditorConfig
00033 {
00034 Q_OBJECT
00035
00036 public:
00037 QEditConfig(QWidget *w = 0);
00038
00039 bool applyImmediately() const;
00040
00041 QMap<QString, QVariant> dumpKeys() const;
00042
00043 public slots:
00044 void retranslate();
00045
00046 void apply();
00047 void cancel();
00048 void restore();
00049
00050 void loadKeys(const QMap<QString, QVariant>& keys);
00051
00052 void setApplyImmediately(bool y);
00053
00054 signals:
00055 void keyChanged(const QString& key, const QVariant& value);
00056
00057 private slots:
00058 void on_spnFontSize_valueChanged(int size);
00059 void on_cbFont_currentFontChanged(QFont font);
00060
00061 void on_spnTabWidth_valueChanged(int n);
00062
00063 void on_chkReplaceTabs_toggled(bool y);
00064
00065 void on_chkShowTabsInText_toggled(bool y);
00066 void on_chkShowLeadingWhitespace_toggled(bool y);
00067 void on_chkShowTrailingWhitespace_toggled(bool y);
00068
00069 void on_cbEncoding_currentIndexChanged(const QString& name);
00070 void on_cbLineEndings_currentIndexChanged(int idx);
00071 void on_chkDetectLE_toggled(bool y);
00072 void on_chkAutoRemoveTrailingWhitespace_toggled(bool y);
00073 void on_chkPreserveTrailingIndent_toggled(bool y);
00074
00075 private:
00076 bool m_direct;
00077 };
00078
00079 #endif // _QEDIT_CONFIG_H_