Ajout d'une option pour exporter le schema sans dessiner les bornes

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@148 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2007-09-30 12:35:25 +00:00
parent 4e11e516f1
commit e6fc33f2bd
5 changed files with 25 additions and 9 deletions

View File

@@ -48,6 +48,7 @@ ExportDialog::ExportDialog(Diagram *dia, QWidget *parent) : QDialog(parent) {
connect(draw_border, SIGNAL(stateChanged(int) ), this, SLOT(slot_refreshPreview()));
connect(draw_inset, SIGNAL(stateChanged(int) ), this, SLOT(slot_refreshPreview()));
connect(draw_columns, SIGNAL(stateChanged(int) ), this, SLOT(slot_refreshPreview()));
connect(draw_terminals, SIGNAL(stateChanged(int) ), this, SLOT(slot_refreshPreview()));
connect(keep_colors, SIGNAL(stateChanged(int) ), this, SLOT(slot_refreshPreview()));
connect(width, SIGNAL(valueChanged(int) ), this, SLOT(slot_refreshPreview()));
connect(height, SIGNAL(valueChanged(int) ), this, SLOT(slot_refreshPreview()));
@@ -141,6 +142,10 @@ QGroupBox *ExportDialog::setupOptionsGroupBox() {
keep_colors = new QCheckBox(tr("Conserver les couleurs"), groupbox_options);
optionshlayout -> addWidget(keep_colors, 3, 0);
// dessiner les bornes
draw_terminals = new QCheckBox(tr("Dessiner les bornes"), groupbox_options);
optionshlayout -> addWidget(draw_terminals, 3, 1);
return(groupbox_options);
}
@@ -261,10 +266,12 @@ QImage ExportDialog::generateImage() {
bool state_drawColumns = diagram -> border_and_inset.columnsAreDisplayed();
bool state_drawInset = diagram -> border_and_inset.insetIsDisplayed();
bool state_drawGrid = diagram -> displayGrid();
bool state_drawTerm = diagram -> drawTerminals();
bool state_useBorder = diagram -> useBorder();
// genere l'image
diagram -> setUseBorder(export_border -> isChecked());
diagram -> setDrawTerminals(draw_terminals -> isChecked());
diagram -> setDisplayGrid(draw_grid -> isChecked());
diagram -> border_and_inset.displayBorder(draw_border -> isChecked());
diagram -> border_and_inset.displayColumns(draw_columns -> isChecked());
@@ -287,6 +294,7 @@ QImage ExportDialog::generateImage() {
diagram -> border_and_inset.displayColumns(state_drawColumns);
diagram -> border_and_inset.displayInset(state_drawInset);
diagram -> setDisplayGrid(state_drawGrid);
diagram -> setDrawTerminals(state_drawTerm);
diagram -> setUseBorder(state_useBorder);
return(image);