QCodeEdit  2.2
qeditconfig.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
4 **
5 ** This file is part of the Edyuk project <http://edyuk.org>
6 **
7 ** This file may be used under the terms of the GNU General Public License
8 ** version 3 as published by the Free Software Foundation and appearing in the
9 ** file GPL.txt included in the packaging of this file.
10 **
11 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 **
14 ****************************************************************************/
15 
16 #ifndef _QEDIT_CONFIG_H_
17 #define _QEDIT_CONFIG_H_
18 
19 #include "qce-config.h"
20 
28 #include "ui_editconfig.h"
29 
30 #include <QWidget>
31 
33 {
34  Q_OBJECT
35 
36  public:
37  QEditConfig(QWidget *w = 0);
38 
39  bool hasUnsavedChanges() const;
40 
41  bool applyImmediately() const;
42 
43  QMap<QString, QVariant> dumpKeys() const;
44 
45  public slots:
46  void retranslate();
47 
48  void apply();
49  void cancel();
50  void restore();
51 
52  void loadKeys(const QMap<QString, QVariant>& keys);
53 
54  void setApplyImmediately(bool y);
55 
56  signals:
57  void keyChanged(const QString& key, const QVariant& value);
58 
59  private slots:
60  void on_spnFontSize_valueChanged(int size);
61  void on_cbFont_currentFontChanged(QFont font);
62 
63  void on_spnTabWidth_valueChanged(int n);
64 
65  void on_chkReplaceTabs_toggled(bool y);
66 
67  void on_chkShowTabsInText_toggled(bool y);
68  void on_chkShowLeadingWhitespace_toggled(bool y);
69  void on_chkShowTrailingWhitespace_toggled(bool y);
70 
71  void on_cbEncoding_currentIndexChanged(const QString& name);
72  void on_cbLineEndings_currentIndexChanged(int idx);
73  void on_chkDetectLE_toggled(bool y);
74  void on_chkAutoRemoveTrailingWhitespace_toggled(bool y);
75  void on_chkPreserveTrailingIndent_toggled(bool y);
76 
77  private:
78  bool m_direct;
79 };
80 
81 #endif // _QEDIT_CONFIG_H_