My Project  0.0.16
QUCS Mapping
 All Classes Namespaces 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.h>
24 #include <qdialog.h>
25 #include <qmap.h>
26 #include <qlistview.h>
27 
28 class QVBoxLayout;
29 class QHBoxLayout;
30 class QGridLayout;
31 class QSpacerItem;
32 class QLabel;
33 class QListView;
34 class QListViewItem;
35 class QPushButton;
36 class QucsDoc;
37 class QucsApp;
38 
39 class SaveDialog : public QDialog
40 {
41  Q_OBJECT
42  public:
43  enum {
47  };
48 
49  SaveDialog(QWidget* p = 0, const char* n = 0, bool modal = true, WFlags fl = 0 );
50  ~SaveDialog();
51  void addUnsavedDoc(QucsDoc *doc);
52  void setApp(QucsApp *a);
53  bool isEmpty() const;
54 
55  protected slots:
56  void dontSaveClicked();
57  void saveSelectedClicked();
58  void languageChange();
59  void reject();
60 
61  private:
62  void initDialog();
63 
64  QMap<QucsDoc*,QCheckListItem*> unsavedDocs;
65 
66  QLabel* label;
67  QListView* filesView;
68  QPushButton* abortClosingButton;
69  QPushButton* dontSaveButton;
70  QPushButton* saveSelectedButton;
71  QVBoxLayout* SaveDialogLayout;
72  QHBoxLayout* buttonsLayout;
73  QSpacerItem* spacer;
74  QucsApp *app;
75 };
76 
77 #endif // SAVEDIALOG_H