CMS 3D CMS Logo

VisEventNavigationDialog.cc

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'VisFramework/VisFrameworkBase/src/VisEventNavigationDialog.ui'
00003 **
00004 ** Created: Fri Feb 9 11:22:08 2007
00005 **      by: The User Interface Compiler ($Id: VisEventNavigationDialog.cc,v 1.1 2007/02/09 13:21:32 yana Exp $)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 
00010 #include "VisFramework/VisFrameworkBase/interface/VisEventNavigationDialog.h"
00011 
00012 #include <qvariant.h>
00013 #include <qpushbutton.h>
00014 #include <qlineedit.h>
00015 #include <qbuttongroup.h>
00016 #include <qradiobutton.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020 
00021 /*
00022  *  Constructs a VisEventNavigationDialog as a child of 'parent', with the
00023  *  name 'name' and widget flags set to 'f'.
00024  *
00025  *  The dialog will by default be modeless, unless you set 'modal' to
00026  *  TRUE to construct a modal dialog.
00027  */
00028 VisEventNavigationDialog::VisEventNavigationDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
00029     : QDialog( parent, name, modal, fl )
00030 {
00031     if ( !name )
00032         setName( "VisEventNavigationDialog" );
00033     VisEventNavigationDialogLayout = new QGridLayout( this, 1, 1, 11, 6, "VisEventNavigationDialogLayout"); 
00034 
00035     skipNumberLineEdit = new QLineEdit( this, "skipNumberLineEdit" );
00036 
00037     VisEventNavigationDialogLayout->addWidget( skipNumberLineEdit, 0, 1 );
00038 
00039     buttonLayout = new QVBoxLayout( 0, 0, 6, "buttonLayout"); 
00040 
00041     okPushButton = new QPushButton( this, "okPushButton" );
00042     buttonLayout->addWidget( okPushButton );
00043 
00044     closePushButton = new QPushButton( this, "closePushButton" );
00045     buttonLayout->addWidget( closePushButton );
00046 
00047     VisEventNavigationDialogLayout->addLayout( buttonLayout, 0, 2 );
00048 
00049     buttonGroup = new QButtonGroup( this, "buttonGroup" );
00050     buttonGroup->setExclusive( TRUE );
00051     buttonGroup->setColumnLayout(0, Qt::Vertical );
00052     buttonGroup->layout()->setSpacing( 6 );
00053     buttonGroup->layout()->setMargin( 11 );
00054     buttonGroupLayout = new QGridLayout( buttonGroup->layout() );
00055     buttonGroupLayout->setAlignment( Qt::AlignTop );
00056 
00057     forwardRadioButton = new QRadioButton( buttonGroup, "forwardRadioButton" );
00058     forwardRadioButton->setChecked( TRUE );
00059 
00060     buttonGroupLayout->addWidget( forwardRadioButton, 0, 0 );
00061 
00062     backRadioButton = new QRadioButton( buttonGroup, "backRadioButton" );
00063 
00064     buttonGroupLayout->addWidget( backRadioButton, 1, 0 );
00065 
00066     VisEventNavigationDialogLayout->addWidget( buttonGroup, 0, 0 );
00067     languageChange();
00068     resize( QSize(369, 103).expandedTo(minimumSizeHint()) );
00069     clearWState( WState_Polished );
00070 
00071     // signals and slots connections
00072     connect( okPushButton, SIGNAL( clicked() ), this, SLOT( skip() ) );
00073     connect( closePushButton, SIGNAL( clicked() ), this, SLOT( close() ) );
00074     connect( skipNumberLineEdit, SIGNAL( returnPressed() ), this, SLOT( skip() ) );
00075 }
00076 
00077 /*
00078  *  Destroys the object and frees any allocated resources
00079  */
00080 VisEventNavigationDialog::~VisEventNavigationDialog()
00081 {
00082     // no need to delete child widgets, Qt does it all for us
00083 }
00084 
00085 /*
00086  *  Sets the strings of the subwidgets using the current
00087  *  language.
00088  */
00089 void VisEventNavigationDialog::languageChange()
00090 {
00091     setCaption( tr( "Event Navigation" ) );
00092     okPushButton->setText( tr( "Go" ) );
00093     QToolTip::add( okPushButton, tr( "Skip events" ) );
00094     QWhatsThis::add( okPushButton, tr( "Skip specified number of events forward." ) );
00095     closePushButton->setText( tr( "Close" ) );
00096     QToolTip::add( closePushButton, tr( "Close the dialog" ) );
00097     QWhatsThis::add( closePushButton, tr( "Close the dialog." ) );
00098     buttonGroup->setTitle( tr( "Skip" ) );
00099     forwardRadioButton->setText( tr( "Forward" ) );
00100     backRadioButton->setText( tr( "Back" ) );
00101 }
00102 
00103 void VisEventNavigationDialog::skipBackwards()
00104 {
00105     qWarning( "VisEventNavigationDialog::skipBackwards(): Not implemented yet" );
00106 }
00107 
00108 void VisEventNavigationDialog::skipForward()
00109 {
00110     qWarning( "VisEventNavigationDialog::skipForward(): Not implemented yet" );
00111 }
00112 
00113 void VisEventNavigationDialog::skip()
00114 {
00115     accept ();
00116 }
00117 

Generated on Tue Jun 9 17:49:57 2009 for CMSSW by  doxygen 1.5.4