My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
diagramdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  diagramdialog.h
3  -----------------
4  begin : Sun Oct 5 2003
5  copyright : (C) 2003 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 DIAGRAMDIALOG_H
19 #define DIAGRAMDIALOG_H
20 
21 #include "diagram.h"
22 #include "node.h"
23 
24 #ifndef M_PI
25 #define M_PI 3.1415926535897932384626433832795029
26 #endif
27 
28 #include <qdialog.h>
29 #include <qregexp.h>
30 
31 class Cross3D;
32 class QLabel;
33 class QListBox;
34 class QLineEdit;
35 class QCheckBox;
36 class QListView;
37 class QListViewItem;
38 class QComboBox;
39 class QListBoxItem;
40 class QVBoxLayout;
41 class QDoubleValidator;
42 class QIntValidator;
43 class QRegExpValidator;
44 class QSlider;
45 
46 
47 class DiagramDialog : public QDialog {
48 Q_OBJECT
49 public:
50  DiagramDialog(Diagram *d, const QString& _DataSet, QWidget *parent=0,
51  Graph *currentGraph=0);
53 
54  bool loadVarData(const QString&);
55  void copyDiagramGraphs();
56 
57 private slots:
58  void slotReadVars(int);
59  void slotTakeVar(QListViewItem*);
60 // void slotSelectGraph(int index);
61  void slotSelectGraph(QListBoxItem*);
62  void slotNewGraph();
63  void slotDeleteGraph();
64  void slotOK();
65  void slotApply();
66  void slotCancel();
67  void slotSetColor();
68  void slotSetGridColor();
69  void slotResetToTake(const QString&);
70  void slotSetProp2(const QString&);
71  void slotSetNumMode(int);
72  void slotSetGridBox(int);
73  void slotSetGraphStyle(int);
74  void slotSetYAxis(int);
75  void slotManualX(int);
76  void slotManualY(int);
77  void slotManualZ(int);
78  void slotChangeTab(QWidget*);
79 
80  void slotNewRotX(int);
81  void slotNewRotY(int);
82  void slotNewRotZ(int);
83  void slotEditRotX(const QString&);
84  void slotEditRotY(const QString&);
85  void slotEditRotZ(const QString&);
86 
87 protected slots:
88  void reject();
89 
90 private:
91  void SelectGraph(Graph*);
92 
93  Diagram *Diag;
94  QString defaultDataSet;
95 
96  QRegExp Expr;
97  QDoubleValidator *ValDouble;
98  QIntValidator *ValInteger;
99  QRegExpValidator *Validator;
100 
101  QComboBox *ChooseData;
102  QListView *ChooseVars;
103  QListBox *GraphList;
104 
105  QVBoxLayout *all; // the mother of all widgets
106  QLineEdit *GraphInput, *Property2, *xLabel, *ylLabel, *yrLabel;
107  QCheckBox *GridOn, *GridLogX, *GridLogY, *GridLogZ;
108  QCheckBox *manualX, *manualY, *manualZ, *hideInvisible;
109  QLineEdit *startX, *stepX, *stopX;
110  QLineEdit *startY, *stepY, *stopY;
111  QLineEdit *startZ, *stepZ, *stopZ;
112  QLineEdit *rotationX, *rotationY, *rotationZ;
113  QLabel *GridLabel1, *GridLabel2, *Label1, *Label2, *Label3, *Label4;
114  QComboBox *PropertyBox, *GridStyleBox, *yAxisBox;
115  QPushButton *ColorButt, *GridColorButt;
116  QSlider *SliderRotX, *SliderRotY, *SliderRotZ;
117  Cross3D *DiagCross;
118  bool changed, transfer, toTake;
119  QPtrList<Graph> Graphs;
120 };
121 
122 #endif