Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
loaddialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2014 Guilherme Brondani Torri <guitorri@gmail.com> *
3  * *
4  * Modified from SaveDialog and LibraryDialog *
5  * *
6  * This is free software; you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as published by *
8  * the Free Software Foundation; either version 2, or (at your option) *
9  * any later version. *
10  * *
11  * This software is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this package; see the file COPYING. If not, write to *
18  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, *
19  * Boston, MA 02110-1301, USA. *
20  ***************************************************************************/
21 
22 #ifndef LOADDIALOG_H
23 #define LOADDIALOG_H
24 
25 #include <QVariant>
26 #include <QDialog>
27 #include <QMap>
28 #include <QBoxLayout>
29 #include <QGridLayout>
30 #include <QBoxLayout>
31 #include <QLabel>
32 #include <QCheckBox>
33 #include <QDir>
34 
35 class QBoxLayout;
36 class QBoxLayout;
37 class QGridLayout;
38 class QSpacerItem;
39 class QLabel;
40 class QListWidget;
41 class QListWidgetItem;
42 class QPushButton;
43 class QucsDoc;
44 class QucsApp;
45 
46 class LoadDialog : public QDialog
47 {
48  Q_OBJECT
49 public:
50 
51  enum {
55  };
56 
57  LoadDialog(QWidget* p = 0, const char* n = 0, bool modal = true, Qt::WFlags fl = 0 );
58  ~LoadDialog();
59  void setApp(QucsApp *a);
60  void initDialog();
61 
62  QStringList symbolFiles;
63  QDir projDir;
64 
65  QMap<QString, QString> selectedComponents;
66 
67 private slots:
68  void slotSelectAll();
69  void slotSelectNone();
70  void slotSymbolFileClicked(QListWidgetItem *item);
71 
72 protected slots:
73  void reject();
74  void loadSelected();
75  void slotChangeIcon();
76 
77 protected:
78  bool eventFilter(QObject *obj, QEvent *event);
79 
80 private:
81  QLabel *iconPixmap;
82  QLabel* label;
83  QListWidget* fileView;
84  QBoxLayout* LoadDialogLayout;
85  QHBoxLayout* buttonsLayout;
86  QSpacerItem* spacer;
88 
89  QPushButton *ButtOk, *ButtCancel,
92 };
93 
94 #endif // LOADDIALOG_H
QLabel * iconPixmap
Definition: loaddialog.h:81
QBoxLayout * LoadDialogLayout
Definition: loaddialog.h:84
QPushButton * ButtSelectNone
Definition: loaddialog.h:89
void slotSymbolFileClicked(QListWidgetItem *item)
Definition: loaddialog.cpp:189
LoadDialog(QWidget *p=0, const char *n=0, bool modal=true, Qt::WFlags fl=0)
Definition: loaddialog.cpp:41
QDir projDir
Definition: loaddialog.h:63
void loadSelected()
Definition: loaddialog.cpp:230
void initDialog()
Definition: loaddialog.cpp:59
QLabel * label
Definition: loaddialog.h:82
QPushButton * ButtChangeIcon
Definition: loaddialog.h:89
QPushButton * ButtCancel
Definition: loaddialog.h:89
QMap< QString, QString > selectedComponents
Definition: loaddialog.h:65
QPushButton * ButtSelectAll
Definition: loaddialog.h:89
QListWidget * fileView
Definition: loaddialog.h:83
QSpacerItem * spacer
Definition: loaddialog.h:86
void slotChangeIcon()
Definition: loaddialog.cpp:260
QPushButton * ButtOk
Definition: loaddialog.h:89
void slotSelectNone()
Definition: loaddialog.cpp:179
void reject()
Definition: loaddialog.cpp:224
bool eventFilter(QObject *obj, QEvent *event)
Definition: loaddialog.cpp:313
void setApp(QucsApp *a)
Definition: loaddialog.cpp:54
QHBoxLayout * buttonsLayout
Definition: loaddialog.h:85
Definition: qucs.h:61
QStringList symbolFiles
Definition: loaddialog.h:62
QucsApp * app
Definition: loaddialog.h:87
void slotSelectAll()
Definition: loaddialog.cpp:169