My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
qucslib.h
Go to the documentation of this file.
1 /***************************************************************************
2  qucslib.h
3  -----------
4  begin : Sat May 28 2005
5  copyright : (C) 2005 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QUCSLIB_H
19 #define QUCSLIB_H
20 
21 #include <qdialog.h>
22 #include <qdir.h>
23 #include <qfont.h>
24 #include <qstring.h>
25 #include <qstringlist.h>
26 
27 class SymbolWidget;
28 class QTextEdit;
29 class QComboBox;
30 class QListBox;
31 class QVGroupBox;
32 class QVBoxLayout;
33 class QListBoxItem;
34 
35 
36 // Application settings.
37 struct tQucsSettings {
38  int x, y, dx, dy; // position and size of main window
39  QFont font; // font
40  QString BitmapDir; // pixmap directory
41  QString LangDir; // translation directory
42  QString LibDir; // library directory
43  QString Language;
44 };
45 
47 extern QDir UserLibDir;
48 
49 class QucsLib : public QDialog {
50  Q_OBJECT
51 public:
52  QucsLib();
53  ~QucsLib();
54 
55  QListBox *CompList;
56  QStringList LibraryComps;
57  QComboBox *Library;
58  QString DefaultSymbol;
59 
60 private slots:
61  void slotAbout();
62  void slotQuit();
63  void slotHelp();
64  void slotCopyToClipBoard();
65  void slotShowModel();
66  void slotSelectLibrary(int);
67  void slotSearchComponent();
68  void slotShowComponent(QListBoxItem*);
69  void slotManageLib();
70 
71 private:
72  void closeEvent(QCloseEvent*);
73  void putLibrariesIntoCombobox();
74  bool getSection(QString, QString &, QString &);
75 
76  int UserLibCount;
77  SymbolWidget *Symbol;
78  QTextEdit *CompDescr;
79  QVBoxLayout *all;
80 
81  QDir QucsHomeDir; // Qucs user directory where all projects are located
82 };
83 
84 #endif /* QUCSLIB_H */