Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/dialogs/exportdialog.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                exportdiagramdialog.h
00003                               ------------------
00004     begin                : Thu Nov 28 2013
00005     copyright            : (C) 2013 by Vadim Kuznetzov
00006     email                : <ra3xdh@gmail.com>
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifndef EXPORTDIALOG_H
00018 #define EXPORTDIALOG_H
00019 
00020 #include <QDialog>
00021 
00022 class QLabel;
00023 class QCheckBox;
00024 class QLineEdit;
00025 class QComboBox;
00026 class QHBoxLayout;
00027 class QVBoxLayout;
00028 
00029 class ExportDialog : public QDialog
00030 {
00031     Q_OBJECT
00032 public:
00033     explicit ExportDialog(int w, int h, int wsel, int hsel, QString filename_, bool nosel_=true, QWidget *parent = 0);
00034     
00035 private:
00036     QPushButton* ExportButt;
00037     QPushButton* CancelButt;
00038     QPushButton* SaveButt;
00039 
00040     QLabel* lblFilename;
00041     QLabel* lblResolutionX;
00042     QLabel* lblResolutionY;
00043     QLabel* lblRatio;
00044     QLabel* lblFormat;
00045 
00046     QCheckBox* cbResolution;
00047     QCheckBox* cbRatio;
00048     QCheckBox* cbSelected;
00049 
00050     QLineEdit* editFilename;
00051     QLineEdit* editResolutionX;
00052     QLineEdit* editResolutionY;
00053     QLineEdit* editScale;
00054 
00055     QComboBox* cbxImgType;
00056 
00057     QHBoxLayout* lower1;
00058     QHBoxLayout* lower2;
00059     QHBoxLayout* lower3;
00060     QHBoxLayout* lower4;
00061     QVBoxLayout* top;
00062 
00063     int dwidth, dheight;
00064 
00065     int dwidthsel, dheightsel;
00066 
00067     float scale;
00068 
00069     bool svg, noselected;
00070 
00071     QString filename;
00072 
00073 public:
00074 
00075     enum ImgFormat {Coloured, Monochrome};
00076 
00077     QString FileToSave();
00078     bool isOriginalSize();
00079     bool isExportSelected();
00080     int Xpixels();
00081     int Ypixels();
00082     bool isSvg();
00083     bool needsInkscape();
00084     bool isValidFilename();
00085     bool isPdf();
00086     bool isPdf_Tex();
00087     bool isEps();
00088     void setDiagram();
00089     float getScale();
00090 
00091     ExportDialog::ImgFormat getImgFormat();
00092 
00093 signals:
00094     
00095 private slots:
00096     void setFileName();
00097     void calcWidth();
00098     void calcHeight();
00099     void recalcRatio();
00100     void restoreOriginalWtoH();
00101     void setSvg(QString filename);
00102     void setSelectedWH();
00103     void recalcScale();
00104 
00105 public slots:
00106     
00107 };
00108 
00109 #endif // EXPORTDIALOG_H
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines