CanvasSettingsBase.cpp

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

Generated for HippoDraw Class Library by doxygen