mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@85 bfdf4180-ca20-0410-9c96-a3a8aa849046
67 lines
1.5 KiB
C++
67 lines
1.5 KiB
C++
#ifndef EXPORTDIALOG_H
|
|
#define EXPORTDIALOG_H
|
|
#include <QtGui>
|
|
#include "diagram.h"
|
|
/**
|
|
Cette classe represente le dialogue permettant d'exporter un schema
|
|
sous forme d'image selon les desirs de l'utilisateur
|
|
*/
|
|
class ExportDialog : public QDialog {
|
|
Q_OBJECT
|
|
|
|
// constructeurs, destructeur
|
|
public:
|
|
ExportDialog(Diagram *, QWidget * = 0);
|
|
virtual ~ExportDialog();
|
|
|
|
private:
|
|
ExportDialog(const ExportDialog &);
|
|
|
|
// attributs
|
|
private:
|
|
// elements graphiques
|
|
QLineEdit *filename;
|
|
QPushButton *button_browse;
|
|
QComboBox *format;
|
|
QSpinBox *width;
|
|
QSpinBox *height;
|
|
QCheckBox *keep_aspect_ratio;
|
|
QCheckBox *draw_grid;
|
|
QCheckBox *draw_border;
|
|
QCheckBox *draw_inset;
|
|
QCheckBox *draw_columns;
|
|
QCheckBox *keep_colors;
|
|
QRadioButton *export_elements;
|
|
QRadioButton *export_border;
|
|
QDialogButtonBox *buttons;
|
|
QGraphicsScene *preview_scene;
|
|
QGraphicsView *preview_view;
|
|
|
|
// booleens pour ne pas avoir de boucle lors de l'edition des dimensions de l'image
|
|
bool dontchangewidth;
|
|
bool dontchangeheight;
|
|
|
|
// elements relatifs au traitement effectue par le dialogue
|
|
Diagram *diagram;
|
|
QSize diagram_size;
|
|
QString diagram_path;
|
|
qreal diagram_ratio;
|
|
|
|
// methodes
|
|
private:
|
|
QWidget *leftPart();
|
|
QWidget *rightPart();
|
|
QGroupBox *setupDimensionsGroupBox();
|
|
QGroupBox *setupOptionsGroupBox();
|
|
QImage generateImage();
|
|
|
|
public slots:
|
|
void slot_correctWidth();
|
|
void slot_correctHeight();
|
|
void slot_chooseAFile();
|
|
void slot_check();
|
|
void slot_changeUseBorder();
|
|
void slot_refreshPreview();
|
|
};
|
|
#endif
|