ListDialogBase.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 ** Form implementation generated from reading ui file 'ListDialogBase.ui'
3 **
4 ** Created by User Interface Compiler
5 **
6 ** WARNING! All changes made in this file will be lost!
7 ****************************************************************************/
8 
9 #include "ListDialogBase.h"
10 
11 #include <qvariant.h>
12 #include <qlabel.h>
13 #include <qheader.h>
14 #include <qlistview.h>
15 #include <qpushbutton.h>
16 #include <qlayout.h>
17 #include <qtooltip.h>
18 #include <qwhatsthis.h>
19 
20 /*
21  * Constructs a ListDialogBase as a child of 'parent', with the
22  * name 'name' and widget flags set to 'f'.
23  *
24  * The dialog will by default be modeless, unless you set 'modal' to
25  * TRUE to construct a modal dialog.
26  */
27 ListDialogBase::ListDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
28  : QDialog( parent, name, modal, fl )
29 {
30  if ( !name )
31  setName( "ListDialogBase" );
32 
33  textLabel1 = new QLabel( this, "textLabel1" );
34  textLabel1->setGeometry( QRect( 10, 10, 280, 101 ) );
35 
36  m_tuple_list = new QListView( this, "m_tuple_list" );
37  m_tuple_list->addColumn( tr( "Item" ) );
38  m_tuple_list->addColumn( tr( "Name" ) );
39  m_tuple_list->setGeometry( QRect( 10, 110, 280, 100 ) );
40  m_tuple_list->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)7, 0, 0, m_tuple_list->sizePolicy().hasHeightForWidth() ) );
41  m_tuple_list->setFrameShape( QListView::StyledPanel );
42  m_tuple_list->setFrameShadow( QListView::Sunken );
43  m_tuple_list->setHScrollBarMode( QListView::Auto );
46  m_tuple_list->setResizeMode( QListView::AllColumns );
47 
48  m_select_button = new QPushButton( this, "m_select_button" );
49  m_select_button->setGeometry( QRect( 160, 225, 91, 28 ) );
51  m_select_button->setDefault( TRUE );
52 
53  m_cancel_button = new QPushButton( this, "m_cancel_button" );
54  m_cancel_button->setGeometry( QRect( 40, 225, 91, 28 ) );
57  resize( QSize(307, 272).expandedTo(minimumSizeHint()) );
58  clearWState( WState_Polished );
59 
60  // signals and slots connections
61  connect( m_select_button, SIGNAL( clicked() ), this, SLOT( accept() ) );
62  connect( m_cancel_button, SIGNAL( clicked() ), this, SLOT( reject() ) );
63  connect( m_tuple_list, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( doubleClicked() ) );
64 }
65 
66 /*
67  * Destroys the object and frees any allocated resources
68  */
70 {
71  // no need to delete child widgets, Qt does it all for us
72 }
73 
74 /*
75  * Sets the strings of the subwidgets using the current
76  * language.
77  */
79 {
80  setCaption( tr( "Select ntuple" ) );
81  textLabel1->setText( tr( "The selected file contains\n"
82 "more than one ntuple.\n"
83 "\n"
84 "Select which one you want from list below.\n"
85 "" ) );
86  m_tuple_list->header()->setLabel( 0, tr( "Item" ) );
87  m_tuple_list->header()->setLabel( 1, tr( "Name" ) );
88  m_select_button->setText( tr( "Select" ) );
89  m_cancel_button->setText( tr( "Cancel" ) );
90 }
91 

Generated for HippoDraw Class Library by doxygen