Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/dialogs/librarydialog.h
Go to the documentation of this file.
00001 /*
00002  * librarydialog.h - declaration of dialog to create library
00003  *
00004  * Copyright (C) 2006, Michael Margraf, michael.margraf@alumni.tu-berlin.de
00005  * Copyright (C) 2014, Yodalee, lc85301@gmail.com
00006  *
00007  * This file is part of Qucs
00008  *
00009  * Qucs is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2, or (at your option)
00012  * any later version.
00013  *
00014  * This software is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with Qucs.  If not, see <http://www.gnu.org/licenses/>.
00021  *
00022  */
00023 
00024 #ifndef LIBRARYDIALOG_H
00025 #define LIBRARYDIALOG_H
00026 
00027 #include <QRegExp>
00028 
00029 #include <QList>
00030 #include <QStringList>
00031 #include <QTextStream>
00032 #include <QDialog>
00033 #include <QFile>
00034 #include <QDir>
00035 #include <QCheckBox>
00036 #include <QVBoxLayout>
00037 #include <QLabel>
00038 #include <QStackedWidget>
00039 
00040 class QLabel;
00041 class QLineEdit;
00042 class QTextEdit;
00043 class QPlainTextEdit;
00044 class QPushButton;
00045 class QVBoxLayout;
00046 class QTreeWidgetItem;
00047 class QGroupBox;
00048 class QRegExpValidator;
00049 class QStackedWidget;
00050 class QStringList;
00051 
00052 
00053 class LibraryDialog : public QDialog {
00054    Q_OBJECT
00055 public:
00056   LibraryDialog(QWidget *);
00057  ~LibraryDialog();
00058 
00059   void fillSchematicList(QStringList);
00060 
00061 private slots:
00062   void slotCreateNext();
00063   void slotSave();
00064   void slotSelectNone();
00065   void slotSelectAll();
00066   void slotCheckDescrChanged(int);
00067   void slotPrevDescr();
00068   void slotNextDescr();
00069   void slotUpdateDescription();
00070 
00071 private:
00072   void intoStream(QTextStream&, QString&, const char*);
00073   int intoFile(QString&, QString&,  QStringList&);
00074 
00075 private:
00076   int curDescr;
00077   QVBoxLayout *all;   // the mother of all widgets
00078   QVBoxLayout *checkBoxLayout;
00079   QStackedWidget *stackedWidgets;
00080   QLabel *theLabel;
00081   QLabel *checkedCktName;
00082   QLabel *libSaveName;
00083   QLineEdit *NameEdit;
00084   QPlainTextEdit *ErrText;
00085   QTextEdit *textDescr;
00086   QGroupBox *Group;
00087   QPushButton *ButtCreateNext, *ButtCancel, *ButtSelectAll, *ButtSelectNone;
00088   QPushButton *prevButt, *nextButt;
00089   QPushButton *createButt;
00090   QList<QCheckBox *> BoxList;
00091   QStringList SelectedNames;
00092   QStringList Descriptions;
00093   QCheckBox *checkDescr;
00094 
00095   QFile LibFile;
00096   QDir LibDir;
00097   QRegExp Expr;
00098   QRegExpValidator *Validator;
00099 };
00100 
00101 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines