CanvasSettingsBase.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 ** Form implementation generated from reading ui file 'CanvasSettingsBase.ui'
3 **
4 ** Created by User Interface Compiler
5 **
6 ** WARNING! All changes made in this file will be lost!
7 ****************************************************************************/
8 
9 #include "CanvasSettingsBase.h"
10 
11 #include <qvariant.h>
12 #include <qbuttongroup.h>
13 #include <qradiobutton.h>
14 #include <qgroupbox.h>
15 #include <qlabel.h>
16 #include <qspinbox.h>
17 #include <qpushbutton.h>
18 #include <qcheckbox.h>
19 #include <qlayout.h>
20 #include <qtooltip.h>
21 #include <qwhatsthis.h>
22 #include <qimage.h>
23 #include <qpixmap.h>
24 
25 /*
26  * Constructs a CanvasSettingsBase as a child of 'parent', with the
27  * name 'name' and widget flags set to 'f'.
28  *
29  * The dialog will by default be modeless, unless you set 'modal' to
30  * TRUE to construct a modal dialog.
31  */
32 CanvasSettingsBase::CanvasSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl )
33  : QDialog( parent, name, modal, fl )
34 {
35  if ( !name )
36  setName( "CanvasSettingsBase" );
37 
38  buttonGroup7 = new QButtonGroup( this, "buttonGroup7" );
39  buttonGroup7->setGeometry( QRect( 10, 10, 360, 70 ) );
40 
41  landscapeRadioButton = new QRadioButton( buttonGroup7, "landscapeRadioButton" );
42  landscapeRadioButton->setGeometry( QRect( 183, 28, 166, 24 ) );
43 
44  portraitRadioButton = new QRadioButton( buttonGroup7, "portraitRadioButton" );
45  portraitRadioButton->setGeometry( QRect( 11, 28, 166, 24 ) );
47 
48  groupBox1 = new QGroupBox( this, "groupBox1" );
49  groupBox1->setGeometry( QRect( 10, 90, 360, 60 ) );
50 
51  textLabel2 = new QLabel( groupBox1, "textLabel2" );
52  textLabel2->setGeometry( QRect( 180, 20, 60, 27 ) );
53  textLabel2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
54 
55  m_v_spin = new QSpinBox( groupBox1, "m_v_spin" );
56  m_v_spin->setGeometry( QRect( 250, 20, 56, 27 ) );
57  m_v_spin->setButtonSymbols( QSpinBox::PlusMinus );
58  m_v_spin->setMinValue( 1 );
59  m_v_spin->setValue( 3 );
60 
61  m_h_spin = new QSpinBox( groupBox1, "m_h_spin" );
62  m_h_spin->setGeometry( QRect( 100, 20, 56, 27 ) );
63  m_h_spin->setButtonSymbols( QSpinBox::PlusMinus );
64  m_h_spin->setMinValue( 1 );
65  m_h_spin->setValue( 2 );
66 
67  textLabel1 = new QLabel( groupBox1, "textLabel1" );
68  textLabel1->setGeometry( QRect( 18, 20, 80, 27 ) );
69  textLabel1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
70 
71  retile = new QPushButton( this, "retile" );
72  retile->setGeometry( QRect( 198, 381, 82, 28 ) );
73 
74  m_save_retile = new QPushButton( this, "m_save_retile" );
75  m_save_retile->setGeometry( QRect( 10, 380, 110, 28 ) );
76 
77  m_cancel = new QPushButton( this, "m_cancel" );
78  m_cancel->setGeometry( QRect( 286, 381, 83, 28 ) );
79 
80  buttonGroup2 = new QButtonGroup( this, "buttonGroup2" );
81  buttonGroup2->setGeometry( QRect( 10, 290, 360, 70 ) );
82 
83  m_visibleMarginRadioButton = new QRadioButton( buttonGroup2, "m_visibleMarginRadioButton" );
84  m_visibleMarginRadioButton->setGeometry( QRect( 11, 28, 166, 24 ) );
85 
86  m_invisibleMarginRadioButton = new QRadioButton( buttonGroup2, "m_invisibleMarginRadioButton" );
87  m_invisibleMarginRadioButton->setGeometry( QRect( 183, 28, 166, 24 ) );
88 
89  buttonGroup4 = new QButtonGroup( this, "buttonGroup4" );
90  buttonGroup4->setGeometry( QRect( 10, 160, 361, 110 ) );
91  buttonGroup4->setExclusive( FALSE );
92 
93  radioButton7 = new QRadioButton( buttonGroup4, "radioButton7" );
94  radioButton7->setGeometry( QRect( 183, 30, 160, 30 ) );
95  radioButton7->setChecked( TRUE );
96 
97  m_add_selected = new QRadioButton( buttonGroup4, "m_add_selected" );
98  m_add_selected->setGeometry( QRect( 10, 30, 131, 31 ) );
99 
100  ignore_margin = new QCheckBox( buttonGroup4, "ignore_margin" );
101  ignore_margin->setEnabled( TRUE );
102  ignore_margin->setGeometry( QRect( 10, 70, 180, 31 ) );
103  languageChange();
104  resize( QSize(377, 429).expandedTo(minimumSizeHint()) );
105  clearWState( WState_Polished );
106 
107  // signals and slots connections
108  connect( m_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
109  connect( m_save_retile, SIGNAL( clicked() ), this, SLOT( saveRetile() ) );
110  connect( retile, SIGNAL( clicked() ), this, SLOT( retile_clicked() ) );
111  connect( portraitRadioButton, SIGNAL( toggled(bool) ), this, SLOT( portraitRadioButton_toggled(bool) ) );
112 }
113 
114 /*
115  * Destroys the object and frees any allocated resources
116  */
118 {
119  // no need to delete child widgets, Qt does it all for us
120 }
121 
122 /*
123  * Sets the strings of the subwidgets using the current
124  * language.
125  */
127 {
128  setCaption( tr( "Canvas settings" ) );
129  buttonGroup7->setTitle( tr( "Orientation" ) );
130  landscapeRadioButton->setText( tr( "Landscape" ) );
131  QToolTip::add( landscapeRadioButton, tr( "Show canvas in landscape orientation" ) );
132  portraitRadioButton->setText( tr( "Portrait" ) );
133  QToolTip::add( portraitRadioButton, tr( "Show canvas in portrait orientation" ) );
134  groupBox1->setTitle( tr( "Plot Matrix" ) );
135  textLabel2->setText( tr( "Vertical:" ) );
136  QToolTip::add( m_v_spin, tr( "Sets number of new plots vertically" ) );
137  QToolTip::add( m_h_spin, tr( "Sets the number of new plots hortizontally" ) );
138  textLabel1->setText( tr( "Horizontal:" ) );
139  retile->setText( tr( "Retile" ) );
140  QToolTip::add( retile, tr( "Retiles the canvas without changing the setting." ) );
141  m_save_retile->setText( tr( "Save && Retile" ) );
142  m_cancel->setText( tr( "Cancel" ) );
143  buttonGroup2->setTitle( tr( "Printer Margin" ) );
144  m_visibleMarginRadioButton->setText( tr( "Visible" ) );
145  QToolTip::add( m_visibleMarginRadioButton, tr( "Printer margins visible on canvas" ) );
146  m_invisibleMarginRadioButton->setText( tr( "Invisible" ) );
147  QToolTip::add( m_invisibleMarginRadioButton, tr( "Printer margins not visible on canvas" ) );
148  buttonGroup4->setTitle( tr( "Added plots" ) );
149  radioButton7->setText( tr( "Not selected" ) );
150  QToolTip::add( radioButton7, tr( "Added plots will not become selected" ) );
151  m_add_selected->setText( tr( "Selected" ) );
152  QToolTip::add( m_add_selected, tr( "Added plots will become selected" ) );
153  ignore_margin->setText( tr( "Ignore printer margin" ) );
154  QToolTip::add( ignore_margin, tr( "When checked, printer margin is ignored when adding displays." ) );
155 }
156 

Generated for HippoDraw Class Library by doxygen