QCodeEdit  2.2
qsnippetedit.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 _QSNIPPET_EDIT_H_
17 #define _QSNIPPET_EDIT_H_
18 
19 #include "qce-config.h"
20 
26 #include <QWidget>
27 #include "ui_snippetedit.h"
28 
29 class QSnippet;
30 class QSnippetManager;
31 
33 {
34  Q_OBJECT
35 
36  public:
37  QSnippetEdit(QWidget *p = 0);
38  QSnippetEdit(QSnippetManager *mgr, QWidget *p = 0);
39 
40  QSnippetManager* snippetManager() const;
41 
42  public slots:
43  void setSnippetManager(QSnippetManager *mgr);
44 
45  bool maybeSave();
46 
47  void retranslate();
48 
49  private slots:
50  void on_lwSnippets_currentRowChanged(int idx);
51 
52  void on_leSnippetName_editingFinished();
53  void on_leSnippetScope_editingFinished();
54 
55  void on_tbCreateSnippet_clicked();
56  void on_tbDeleteSnippet_clicked();
57  void on_bMoreSnippets_clicked();
58 
59  void snippetRemoved(int i);
60  void snippetAdded(QSnippet *s);
61 
62  private:
63  int m_editedSnippet;
64  QSnippetManager *m_manager;
65 };
66 
67 #endif
#define QCE_EXPORT
Macro needed for cross-platform shared libraries creation.
Definition: qce-config.h:40
Utility file for shared library creation.
A class managing code snippets.
Definition: qsnippetmanager.h:31
Definition: ui_snippetedit.h:185
The base class for snippets.
Definition: qsnippet.h:33
A widget for snippets management.
Definition: qsnippetedit.h:32