Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
savedialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2006 by Gopala Krishna A <krishna.ggk@gmail.com> *
3  * *
4  * This is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2, or (at your option) *
7  * any later version. *
8  * *
9  * This software is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this package; see the file COPYING. If not, write to *
16  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, *
17  * Boston, MA 02110-1301, USA. *
18  ***************************************************************************/
19 
20 #ifndef SAVEDIALOG_H
21 #define SAVEDIALOG_H
22 
23 #include <QVariant>
24 #include <QDialog>
25 #include <QMap>
26 #include <QBoxLayout>
27 #include <QGridLayout>
28 #include <QBoxLayout>
29 #include <QLabel>
30 #include <QCheckBox>
31 
32 class QBoxLayout;
33 class QBoxLayout;
34 class QGridLayout;
35 class QSpacerItem;
36 class QLabel;
37 class QListWidget;
38 class QListWidgetItem;
39 class QPushButton;
40 class QucsDoc;
41 class QucsApp;
42 
43 class SaveDialog : public QDialog
44 {
45  Q_OBJECT
46  public:
47  enum {
51  };
52 
53  SaveDialog(QWidget* p = 0, const char* n = 0, bool modal = true, Qt::WFlags fl = 0 );
54  ~SaveDialog();
55  void addUnsavedDoc(QucsDoc *doc);
56  void setApp(QucsApp *a);
57  bool isEmpty() const;
58 
59  protected slots:
60  void dontSaveClicked();
61  void saveSelectedClicked();
62  void reject();
63 
64  private:
65  void initDialog();
66 
67  QMap<QucsDoc*,QListWidgetItem*> unsavedDocs;
68 
69  QLabel* label;
70  QListWidget* fileView;
71  QPushButton* abortClosingButton;
72  QPushButton* dontSaveButton;
73  QPushButton* saveSelectedButton;
74  QBoxLayout* SaveDialogLayout;
75  QHBoxLayout* buttonsLayout;
76  QSpacerItem* spacer;
78 };
79 
80 #endif // SAVEDIALOG_H
void setApp(QucsApp *a)
Definition: savedialog.cpp:45
QucsApp * app
Definition: savedialog.h:77
bool isEmpty() const
Definition: savedialog.cpp:130
QBoxLayout * SaveDialogLayout
Definition: savedialog.h:74
void saveSelectedClicked()
Definition: savedialog.cpp:106
QLabel * label
Definition: savedialog.h:69
QPushButton * dontSaveButton
Definition: savedialog.h:72
QSpacerItem * spacer
Definition: savedialog.h:76
void dontSaveClicked()
Definition: savedialog.cpp:101
SaveDialog(QWidget *p=0, const char *n=0, bool modal=true, Qt::WFlags fl=0)
Definition: savedialog.cpp:32
QPushButton * abortClosingButton
Definition: savedialog.h:71
QPushButton * saveSelectedButton
Definition: savedialog.h:73
QMap< QucsDoc *, QListWidgetItem * > unsavedDocs
Definition: savedialog.h:67
void addUnsavedDoc(QucsDoc *doc)
Definition: savedialog.cpp:90
void reject()
Definition: savedialog.cpp:125
Definition: qucs.h:61
QListWidget * fileView
Definition: savedialog.h:70
void initDialog()
Definition: savedialog.cpp:50
QHBoxLayout * buttonsLayout
Definition: savedialog.h:75