MagicSmoke  $VERSION$
templatedlg.h
Go to the documentation of this file.
1 //
2 // C++ Interface: templatedlg
3 //
4 // Description:
5 //
6 //
7 // Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2008-2011
8 //
9 // Copyright: See README/COPYING.GPL files that come with this distribution
10 //
11 //
12 
13 #ifndef MAGICSMOKE_TEMPLATEDLG_H
14 #define MAGICSMOKE_TEMPLATEDLG_H
15 
16 #include <QDialog>
17 #include <QString>
18 
19 #include "templates.h"
20 
21 class QComboBox;
22 class QStandardItem;
23 class QStandardItemModel;
24 class QStringList;
25 class QTreeView;
26 
28 class MTemplateChoice:public QDialog
29 {
30  Q_OBJECT
31  public:
32  MTemplateChoice(const QList<MTemplate>&);
33 
35  MTemplate choice()const;
36  private:
37  //selection box
38  QComboBox*box;
39  //data
40  QList<MTemplate>templst;
41 };
42 
44 class MTemplateEditor:public QDialog
45 {
46  Q_OBJECT
47  public:
49 
50  private slots:
51  void updateView();
52  void deleteItem();
53  void addItem();
54  void changeDescr(QStandardItem*);
55  void changeFlags();
56  void forceUpdate();
57  void editItem();
58  void saveItem();
59  private:
60  MTemplateStore*store;
61  QTreeView*tree;
62  QStandardItemModel*model;
63  bool nochange;
64 };
65 
66 
67 
68 #endif
this class wraps a single template
Definition: templates.h:25
gives the user a choice of template variants; used by MTemplateStore only!
Definition: templatedlg.h:28
MTemplate choice() const
returns the choice made by the user
Definition: templatedlg.cpp:54
lets the user add and remove templates and variants to/from the database; used by MWebRequest! ...
Definition: templatedlg.h:44
this class implements the storage end of the template subsystem, its only instance exists in the webr...
Definition: templates.h:149
MTemplateChoice(const QList< MTemplate > &)
Definition: templatedlg.cpp:31
MTemplateEditor(MTemplateStore *)
Definition: templatedlg.cpp:72