Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
exportdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  exportdiagramdialog.h
3  ------------------
4  begin : Thu Nov 28 2013
5  copyright : (C) 2013 by Vadim Kuznetzov
6  email : <ra3xdh@gmail.com>
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 #ifndef EXPORTDIALOG_H
18 #define EXPORTDIALOG_H
19 
20 #include <QObject>
21 #include <QtGui>
22 #include <QDialog>
23 
24 
25 class ExportDialog : public QDialog
26 {
27  Q_OBJECT
28 public:
29  explicit ExportDialog(int w, int h, int wsel, int hsel, QString filename_, bool nosel_=true, QWidget *parent = 0);
30 
31 private:
32  QPushButton* ExportButt;
33  QPushButton* CancelButt;
34  QPushButton* SaveButt;
35 
36  QLabel* lblFilename;
37  QLabel* lblResolutionX;
38  QLabel* lblResolutionY;
39  QLabel* lblRatio;
40  QLabel* lblFormat;
41 
42  QCheckBox* cbResolution;
43  QCheckBox* cbRatio;
44  QCheckBox* cbSelected;
45 
46  QLineEdit* editFilename;
47  QLineEdit* editResolutionX;
48  QLineEdit* editResolutionY;
49  QLineEdit* editScale;
50 
51  QComboBox* cbxImgType;
52 
53  QHBoxLayout* lower1;
54  QHBoxLayout* lower2;
55  QHBoxLayout* lower3;
56  QHBoxLayout* lower4;
57  QVBoxLayout* top;
58 
60 
62 
63  float scale;
64 
65  bool svg, noselected;
66 
67  QString filename;
68 
69 public:
70 
72 
73  QString FileToSave();
74  bool isOriginalSize();
75  bool isExportSelected();
76  int Xpixels();
77  int Ypixels();
78  bool isSvg();
79  bool needsInkscape();
80  bool isValidFilename();
81  bool isPdf();
82  bool isPdf_Tex();
83  bool isEps();
84  void setDiagram();
85  float getScale();
86 
88 
89 signals:
90 
91 private slots:
92  void setFileName();
93  void calcWidth();
94  void calcHeight();
95  void recalcRatio();
96  void restoreOriginalWtoH();
97  void setSvg(QString filename);
98  void setSelectedWH();
99  void recalcScale();
100 
101 public slots:
102 
103 };
104 
105 #endif // EXPORTDIALOG_H
QLabel * lblRatio
Definition: exportdialog.h:39
QLineEdit * editResolutionX
Definition: exportdialog.h:47
QCheckBox * cbResolution
Definition: exportdialog.h:42
void setFileName()
QPushButton * ExportButt
Definition: exportdialog.h:32
float getScale()
QLineEdit * editScale
Definition: exportdialog.h:49
bool needsInkscape()
QString FileToSave()
QLineEdit * editFilename
Definition: exportdialog.h:46
QComboBox * cbxImgType
Definition: exportdialog.h:51
QVBoxLayout * top
Definition: exportdialog.h:57
ExportDialog::ImgFormat getImgFormat()
void restoreOriginalWtoH()
QLabel * lblFilename
Definition: exportdialog.h:36
QPushButton * SaveButt
Definition: exportdialog.h:34
void recalcScale()
QLineEdit * editResolutionY
Definition: exportdialog.h:48
QCheckBox * cbSelected
Definition: exportdialog.h:44
QHBoxLayout * lower4
Definition: exportdialog.h:56
void setSelectedWH()
void recalcRatio()
ExportDialog(int w, int h, int wsel, int hsel, QString filename_, bool nosel_=true, QWidget *parent=0)
QLabel * lblFormat
Definition: exportdialog.h:40
void setSvg(QString filename)
bool isOriginalSize()
QString filename
Definition: exportdialog.h:67
QLabel * lblResolutionX
Definition: exportdialog.h:37
bool isValidFilename()
bool isExportSelected()
QCheckBox * cbRatio
Definition: exportdialog.h:43
QHBoxLayout * lower2
Definition: exportdialog.h:54
QPushButton * CancelButt
Definition: exportdialog.h:33
QHBoxLayout * lower1
Definition: exportdialog.h:53
QLabel * lblResolutionY
Definition: exportdialog.h:38
QHBoxLayout * lower3
Definition: exportdialog.h:55