CanvasSettingsBase.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'CanvasSettingsBase.ui'
00003 **
00004 ** Created by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00005 **
00006 ** WARNING! All changes made in this file will be lost!
00007 ****************************************************************************/
00008 
00009 #include "CanvasSettingsBase.h"
00010 
00011 #include <qvariant.h>
00012 #include <qbuttongroup.h>
00013 #include <qradiobutton.h>
00014 #include <qgroupbox.h>
00015 #include <qlabel.h>
00016 #include <qspinbox.h>
00017 #include <qpushbutton.h>
00018 #include <qcheckbox.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 #include <qimage.h>
00023 #include <qpixmap.h>
00024 
00025 /*
00026  *  Constructs a CanvasSettingsBase as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
00028  *
00029  *  The dialog will by default be modeless, unless you set 'modal' to
00030  *  TRUE to construct a modal dialog.
00031  */
00032 CanvasSettingsBase::CanvasSettingsBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00033     : QDialog( parent, name, modal, fl )
00034 {
00035     if ( !name )
00036         setName( "CanvasSettingsBase" );
00037 
00038     buttonGroup7 = new QButtonGroup( this, "buttonGroup7" );
00039     buttonGroup7->setGeometry( QRect( 10, 10, 360, 70 ) );
00040 
00041     landscapeRadioButton = new QRadioButton( buttonGroup7, "landscapeRadioButton" );
00042     landscapeRadioButton->setGeometry( QRect( 183, 28, 166, 24 ) );
00043 
00044     portraitRadioButton = new QRadioButton( buttonGroup7, "portraitRadioButton" );
00045     portraitRadioButton->setGeometry( QRect( 11, 28, 166, 24 ) );
00046     portraitRadioButton->setChecked( TRUE );
00047 
00048     groupBox1 = new QGroupBox( this, "groupBox1" );
00049     groupBox1->setGeometry( QRect( 10, 90, 360, 60 ) );
00050 
00051     textLabel2 = new QLabel( groupBox1, "textLabel2" );
00052     textLabel2->setGeometry( QRect( 180, 20, 60, 27 ) );
00053     textLabel2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00054 
00055     m_v_spin = new QSpinBox( groupBox1, "m_v_spin" );
00056     m_v_spin->setGeometry( QRect( 250, 20, 56, 27 ) );
00057     m_v_spin->setButtonSymbols( QSpinBox::PlusMinus );
00058     m_v_spin->setMinValue( 1 );
00059     m_v_spin->setValue( 3 );
00060 
00061     m_h_spin = new QSpinBox( groupBox1, "m_h_spin" );
00062     m_h_spin->setGeometry( QRect( 100, 20, 56, 27 ) );
00063     m_h_spin->setButtonSymbols( QSpinBox::PlusMinus );
00064     m_h_spin->setMinValue( 1 );
00065     m_h_spin->setValue( 2 );
00066 
00067     textLabel1 = new QLabel( groupBox1, "textLabel1" );
00068     textLabel1->setGeometry( QRect( 18, 20, 80, 27 ) );
00069     textLabel1->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00070 
00071     retile = new QPushButton( this, "retile" );
00072     retile->setGeometry( QRect( 198, 381, 82, 28 ) );
00073 
00074     m_save_retile = new QPushButton( this, "m_save_retile" );
00075     m_save_retile->setGeometry( QRect( 10, 380, 110, 28 ) );
00076 
00077     m_cancel = new QPushButton( this, "m_cancel" );
00078     m_cancel->setGeometry( QRect( 286, 381, 83, 28 ) );
00079 
00080     buttonGroup2 = new QButtonGroup( this, "buttonGroup2" );
00081     buttonGroup2->setGeometry( QRect( 10, 290, 360, 70 ) );
00082 
00083     m_visibleMarginRadioButton = new QRadioButton( buttonGroup2, "m_visibleMarginRadioButton" );
00084     m_visibleMarginRadioButton->setGeometry( QRect( 11, 28, 166, 24 ) );
00085 
00086     m_invisibleMarginRadioButton = new QRadioButton( buttonGroup2, "m_invisibleMarginRadioButton" );
00087     m_invisibleMarginRadioButton->setGeometry( QRect( 183, 28, 166, 24 ) );
00088 
00089     buttonGroup4 = new QButtonGroup( this, "buttonGroup4" );
00090     buttonGroup4->setGeometry( QRect( 10, 160, 361, 110 ) );
00091     buttonGroup4->setExclusive( FALSE );
00092 
00093     radioButton7 = new QRadioButton( buttonGroup4, "radioButton7" );
00094     radioButton7->setGeometry( QRect( 183, 30, 160, 30 ) );
00095     radioButton7->setChecked( TRUE );
00096 
00097     m_add_selected = new QRadioButton( buttonGroup4, "m_add_selected" );
00098     m_add_selected->setGeometry( QRect( 10, 30, 131, 31 ) );
00099 
00100     ignore_margin = new QCheckBox( buttonGroup4, "ignore_margin" );
00101     ignore_margin->setEnabled( TRUE );
00102     ignore_margin->setGeometry( QRect( 10, 70, 180, 31 ) );
00103     languageChange();
00104     resize( QSize(377, 429).expandedTo(minimumSizeHint()) );
00105     clearWState( WState_Polished );
00106 
00107     // signals and slots connections
00108     connect( m_cancel, SIGNAL( clicked() ), this, SLOT( cancel() ) );
00109     connect( m_save_retile, SIGNAL( clicked() ), this, SLOT( saveRetile() ) );
00110     connect( retile, SIGNAL( clicked() ), this, SLOT( retile_clicked() ) );
00111     connect( portraitRadioButton, SIGNAL( toggled(bool) ), this, SLOT( portraitRadioButton_toggled(bool) ) );
00112 }
00113 
00114 /*
00115  *  Destroys the object and frees any allocated resources
00116  */
00117 CanvasSettingsBase::~CanvasSettingsBase()
00118 {
00119     // no need to delete child widgets, Qt does it all for us
00120 }
00121 
00122 /*
00123  *  Sets the strings of the subwidgets using the current
00124  *  language.
00125  */
00126 void CanvasSettingsBase::languageChange()
00127 {
00128     setCaption( tr( "Canvas settings" ) );
00129     buttonGroup7->setTitle( tr( "Orientation" ) );
00130     landscapeRadioButton->setText( tr( "Landscape" ) );
00131     QToolTip::add( landscapeRadioButton, tr( "Show canvas in landscape orientation" ) );
00132     portraitRadioButton->setText( tr( "Portrait" ) );
00133     QToolTip::add( portraitRadioButton, tr( "Show canvas in portrait orientation" ) );
00134     groupBox1->setTitle( tr( "Plot Matrix" ) );
00135     textLabel2->setText( tr( "Vertical:" ) );
00136     QToolTip::add( m_v_spin, tr( "Sets number of new plots vertically" ) );
00137     QToolTip::add( m_h_spin, tr( "Sets the number of new plots hortizontally" ) );
00138     textLabel1->setText( tr( "Horizontal:" ) );
00139     retile->setText( tr( "Retile" ) );
00140     QToolTip::add( retile, tr( "Retiles the canvas without changing the setting." ) );
00141     m_save_retile->setText( tr( "Save && Retile" ) );
00142     m_cancel->setText( tr( "Cancel" ) );
00143     buttonGroup2->setTitle( tr( "Printer Margin" ) );
00144     m_visibleMarginRadioButton->setText( tr( "Visible" ) );
00145     QToolTip::add( m_visibleMarginRadioButton, tr( "Printer margins visible on canvas" ) );
00146     m_invisibleMarginRadioButton->setText( tr( "Invisible" ) );
00147     QToolTip::add( m_invisibleMarginRadioButton, tr( "Printer margins not visible on canvas" ) );
00148     buttonGroup4->setTitle( tr( "Added plots" ) );
00149     radioButton7->setText( tr( "Not selected" ) );
00150     QToolTip::add( radioButton7, tr( "Added plots will not become selected" ) );
00151     m_add_selected->setText( tr( "Selected" ) );
00152     QToolTip::add( m_add_selected, tr( "Added plots will become selected" ) );
00153     ignore_margin->setText( tr( "Ignore printer margin" ) );
00154     QToolTip::add( ignore_margin, tr( "When checked, printer margin is ignored when adding displays." ) );
00155 }
00156 

Generated for HippoDraw Class Library by doxygen