QCodeEdit 2.2
|
00001 /**************************************************************************** 00002 ** 00003 ** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr> 00004 ** 00005 ** This file is part of the Edyuk project <http://edyuk.org> 00006 ** 00007 ** This file may be used under the terms of the GNU General Public License 00008 ** version 3 as published by the Free Software Foundation and appearing in the 00009 ** file GPL.txt included in the packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 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 hasUnsavedChanges() const; 00040 00041 bool applyImmediately() const; 00042 00043 QMap<QString, QVariant> dumpKeys() const; 00044 00045 public slots: 00046 void retranslate(); 00047 00048 void apply(); 00049 void cancel(); 00050 void restore(); 00051 00052 void loadKeys(const QMap<QString, QVariant>& keys); 00053 00054 void setApplyImmediately(bool y); 00055 00056 signals: 00057 void keyChanged(const QString& key, const QVariant& value); 00058 00059 private slots: 00060 void on_spnFontSize_valueChanged(int size); 00061 void on_cbFont_currentFontChanged(QFont font); 00062 00063 void on_spnTabWidth_valueChanged(int n); 00064 00065 void on_chkReplaceTabs_toggled(bool y); 00066 00067 void on_chkShowTabsInText_toggled(bool y); 00068 void on_chkShowLeadingWhitespace_toggled(bool y); 00069 void on_chkShowTrailingWhitespace_toggled(bool y); 00070 00071 void on_cbEncoding_currentIndexChanged(const QString& name); 00072 void on_cbLineEndings_currentIndexChanged(int idx); 00073 void on_chkDetectLE_toggled(bool y); 00074 void on_chkAutoRemoveTrailingWhitespace_toggled(bool y); 00075 void on_chkPreserveTrailingIndent_toggled(bool y); 00076 00077 private: 00078 bool m_direct; 00079 }; 00080 00081 #endif // _QEDIT_CONFIG_H_