CreateNTupleBase.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 ** Form implementation generated from reading ui file 'CreateNTupleBase.ui'
3 **
4 ** Created:
5 **
6 ** WARNING! All changes made in this file will be lost!
7 ****************************************************************************/
8 
9 #include "CreateNTupleBase.h"
10 
11 #include <qvariant.h>
12 #include <qpushbutton.h>
13 #include <qlabel.h>
14 #include <qcheckbox.h>
15 #include <qheader.h>
16 #include <qlistview.h>
17 #include <qlineedit.h>
18 #include <qcombobox.h>
19 #include <qlayout.h>
20 #include <qtooltip.h>
21 #include <qwhatsthis.h>
22 #include <qimage.h>
23 #include <qpixmap.h>
24 
25 static const unsigned char image0_data[] = {
26  0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
27  0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30,
28  0x08, 0x06, 0x00, 0x00, 0x00, 0x57, 0x02, 0xf9, 0x87, 0x00, 0x00, 0x01,
29  0xc9, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0xed, 0x59, 0xdb, 0xad, 0xc3,
30  0x20, 0x0c, 0x85, 0xaa, 0x03, 0x64, 0x8a, 0x7e, 0x30, 0x42, 0x07, 0x63,
31  0x08, 0x06, 0x63, 0x04, 0x3e, 0x32, 0x45, 0x37, 0xa0, 0x3f, 0xd7, 0x15,
32  0x10, 0x20, 0x06, 0x4c, 0x7c, 0xa9, 0x7a, 0xa4, 0x4a, 0x2d, 0xc5, 0xc6,
33  0x07, 0xbf, 0x08, 0x91, 0xd6, 0x5a, 0xb1, 0x32, 0x6e, 0xe9, 0x80, 0x31,
34  0xc6, 0xf7, 0x2a, 0x33, 0xc6, 0xf8, 0x9c, 0x7c, 0x38, 0x96, 0xfe, 0x1f,
35  0xca, 0xf4, 0xac, 0xfd, 0x21, 0x00, 0xc2, 0x5a, 0x6b, 0xd9, 0x4b, 0x42,
36  0x6b, 0x2d, 0x43, 0xf9, 0x9a, 0x9e, 0x70, 0x3d, 0xad, 0xb5, 0x4c, 0xc7,
37  0xb1, 0x90, 0x1c, 0x21, 0x64, 0x8c, 0xf1, 0xa1, 0xd1, 0x23, 0x60, 0x21,
38  0x40, 0x89, 0x28, 0x84, 0x46, 0xe2, 0x9f, 0x0b, 0x77, 0x21, 0xca, 0x2e,
39  0x55, 0x4a, 0x45, 0x84, 0x9c, 0x73, 0x32, 0x1d, 0x6b, 0x05, 0x85, 0x0e,
40  0xd0, 0x23, 0xc4, 0x9f, 0x07, 0xc0, 0xf8, 0x33, 0x0f, 0x50, 0x2c, 0x4c,
41  0xa1, 0x23, 0x44, 0x54, 0x46, 0xa9, 0x12, 0xeb, 0x4a, 0x1c, 0xfa, 0x40,
42  0x0f, 0x9c, 0x73, 0x12, 0x5c, 0x7a, 0x35, 0xee, 0x33, 0x94, 0x6e, 0x1b,
43  0x6e, 0xde, 0xeb, 0x35, 0x2e, 0x37, 0x85, 0x00, 0x2c, 0x50, 0x32, 0x28,
44  0x35, 0x7c, 0x44, 0x8e, 0xf4, 0x28, 0x81, 0x59, 0xb0, 0x64, 0x7c, 0xaf,
45  0xdc, 0x4d, 0x88, 0xd8, 0xe8, 0xd5, 0x12, 0x39, 0x2a, 0xa3, 0x2b, 0x82,
46  0xa4, 0x0a, 0x71, 0xa2, 0x9a, 0xc4, 0x50, 0x1a, 0xa9, 0x9b, 0xcf, 0x08,
47  0xd2, 0x72, 0x5d, 0x25, 0xf0, 0x9f, 0x0c, 0x07, 0x80, 0x4d, 0xd1, 0x51,
48  0x62, 0x65, 0x0c, 0x13, 0xe0, 0xea, 0xc0, 0x80, 0x88, 0x40, 0x6f, 0x0f,
49  0x50, 0xcf, 0x27, 0x5b, 0xa8, 0x1d, 0x0e, 0x73, 0xb3, 0x9f, 0x09, 0xb6,
50  0x0d, 0xf7, 0xc1, 0xe2, 0x90, 0xc4, 0xb3, 0x7b, 0x02, 0xa6, 0x13, 0x0b,
51  0x81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 0x88, 0x42,
66  0x08, 0x3c, 0xb1, 0x92, 0x47, 0xbe, 0xe7, 0x45, 0xf7, 0xaa, 0x58, 0x9e,
67  0xc0, 0x1b, 0x5b, 0x30, 0x27, 0xfc, 0x20, 0x43, 0xfa, 0x3b, 0x00, 0x00,
68  0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
69 };
70 
71 
72 /*
73  * Constructs a CreateNTupleBase as a child of 'parent', with the
74  * name 'name' and widget flags set to 'f'.
75  *
76  * The dialog will by default be modeless, unless you set 'modal' to
77  * TRUE to construct a modal dialog.
78  */
79 CreateNTupleBase::CreateNTupleBase( QWidget* parent, const char* name, bool modal, WFlags fl )
80  : QDialog( parent, name, modal, fl )
81 {
82  QImage img;
83  img.loadFromData( image0_data, sizeof( image0_data ), "PNG" );
84  image0 = img;
85  if ( !name )
86  setName( "CreateNTupleBase" );
87  setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
88  setMinimumSize( QSize( 437, 500 ) );
89  setMaximumSize( QSize( 437, 500 ) );
90  setIcon( image0 );
91 
92  QWidget* privateLayoutWidget = new QWidget( this, "layout9" );
93  privateLayoutWidget->setGeometry( QRect( 10, 60, 418, 174 ) );
94  layout9 = new QVBoxLayout( privateLayoutWidget, 11, 6, "layout9");
95 
96  layout7 = new QHBoxLayout( 0, 0, 6, "layout7");
97 
98  textLabel1 = new QLabel( privateLayoutWidget, "textLabel1" );
99  layout7->addWidget( textLabel1 );
100 
101  cutListCheckBox = new QCheckBox( privateLayoutWidget, "cutListCheckBox" );
102  layout7->addWidget( cutListCheckBox );
103  layout9->addLayout( layout7 );
104 
105  m_CutListView = new QListView( privateLayoutWidget, "m_CutListView" );
106  m_CutListView->setHScrollBarMode( QListView::AlwaysOff );
109  m_CutListView->setResizeMode( QListView::AllColumns );
111  layout9->addWidget( m_CutListView );
112 
113  QWidget* privateLayoutWidget_2 = new QWidget( this, "layout10" );
114  privateLayoutWidget_2->setGeometry( QRect( 10, 240, 418, 174 ) );
115  layout10 = new QVBoxLayout( privateLayoutWidget_2, 11, 6, "layout10");
116 
117  layout8 = new QHBoxLayout( 0, 0, 6, "layout8");
118 
119  textLabel2 = new QLabel( privateLayoutWidget_2, "textLabel2" );
120  layout8->addWidget( textLabel2 );
121 
122  columnListCheckBox = new QCheckBox( privateLayoutWidget_2, "columnListCheckBox" );
123  layout8->addWidget( columnListCheckBox );
124  layout10->addLayout( layout8 );
125 
126  m_ColumnListView = new QListView( privateLayoutWidget_2, "m_ColumnListView" );
127  m_ColumnListView->setHScrollBarMode( QListView::AlwaysOff );
130  m_ColumnListView->setResizeMode( QListView::AllColumns );
132  layout10->addWidget( m_ColumnListView );
133 
134  textLabel1_2 = new QLabel( this, "textLabel1_2" );
135  textLabel1_2->setGeometry( QRect( 12, 428, 109, 23 ) );
136 
137  m_ntuple_out = new QLineEdit( this, "m_ntuple_out" );
138  m_ntuple_out->setGeometry( QRect( 127, 428, 291, 23 ) );
139 
140  m_ntuple_in = new QComboBox( FALSE, this, "m_ntuple_in" );
141  m_ntuple_in->setGeometry( QRect( 95, 11, 332, 26 ) );
142  m_ntuple_in->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, m_ntuple_in->sizePolicy().hasHeightForWidth() ) );
143  m_ntuple_in->setMaximumSize( QSize( 32767, 26 ) );
144  m_ntuple_in->setEditable( TRUE );
145  m_ntuple_in->setInsertionPolicy( QComboBox::AtCurrent );
146 
147  TextLabel1_3_2 = new QLabel( this, "TextLabel1_3_2" );
148  TextLabel1_3_2->setGeometry( QRect( 11, 11, 78, 26 ) );
149  TextLabel1_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, TextLabel1_3_2->sizePolicy().hasHeightForWidth() ) );
150  TextLabel1_3_2->setMaximumSize( QSize( 78, 32767 ) );
151  TextLabel1_3_2->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
152 
153  createFileButton = new QPushButton( this, "createFileButton" );
154  createFileButton->setGeometry( QRect( 148, 459, 135, 32 ) );
155 
156  createNTupleButton = new QPushButton( this, "createNTupleButton" );
157  createNTupleButton->setGeometry( QRect( 12, 459, 130, 32 ) );
158 
159  cancelButton = new QPushButton( this, "cancelButton" );
160  cancelButton->setGeometry( QRect( 290, 460, 129, 32 ) );
161  languageChange();
162  resize( QSize(437, 500).expandedTo(minimumSizeHint()) );
163  clearWState( WState_Polished );
164 
165  // signals and slots connections
166  connect( m_ntuple_in, SIGNAL( highlighted(int) ), this, SLOT( currentDataSourceChanged(int) ) );
167  connect( createNTupleButton, SIGNAL( clicked() ), this, SLOT( createButtonClicked() ) );
168  connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
169  connect( createNTupleButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
170  connect( cutListCheckBox, SIGNAL( toggled(bool) ), this, SLOT( cutListCheckBox_toggled(bool) ) );
171  connect( columnListCheckBox, SIGNAL( toggled(bool) ), this, SLOT( columnListCheckBox_toggled(bool) ) );
172  connect( createFileButton, SIGNAL( clicked() ), this, SLOT( createFileButtonClicked() ) );
173 }
174 
175 /*
176  * Destroys the object and frees any allocated resources
177  */
179 {
180  // no need to delete child widgets, Qt does it all for us
181 }
182 
183 /*
184  * Sets the strings of the subwidgets using the current
185  * language.
186  */
188 {
189  setCaption( tr( "Create NTuple" ) );
190  QToolTip::add( this, QString::null );
191  QWhatsThis::add( this, QString::null );
192  textLabel1->setText( tr( "Cut List:" ) );
193  cutListCheckBox->setText( tr( "Select / deselect all" ) );
194  QToolTip::add( cutListCheckBox, tr( "Click to select or deselect all" ) );
195  QWhatsThis::add( cutListCheckBox, tr( "Use to select or deselect all cuts" ) );
196  QToolTip::add( m_CutListView, tr( "Select which cuts to use" ) );
197  QWhatsThis::add( m_CutListView, tr( "Apply the selected cuts in creation of new data source" ) );
198  textLabel2->setText( tr( "Column List:" ) );
199  columnListCheckBox->setText( tr( "Select / deselect all" ) );
200  QToolTip::add( columnListCheckBox, tr( "Click to select or deselect all" ) );
201  QWhatsThis::add( columnListCheckBox, tr( "Use to select or deselect all columns" ) );
202  QToolTip::add( m_ColumnListView, tr( "Select columns for new data source" ) );
203  QWhatsThis::add( m_ColumnListView, tr( "The new data source will contain only the selected coulumns." ) );
204  textLabel1_2->setText( tr( "Data source name:" ) );
205  QToolTip::add( m_ntuple_out, tr( "Name of new data source" ) );
206  QWhatsThis::add( m_ntuple_out, tr( "Type the name of the new data source (not filename) here." ) );
207  QToolTip::add( m_ntuple_in, tr( "Select a data source as input" ) );
208  QWhatsThis::add( m_ntuple_in, tr( "Select the data source from which the new data source will be a subset." ) );
209  TextLabel1_3_2->setText( tr( "Data source:" ) );
210  createFileButton->setText( tr( "Create NTuple to file" ) );
211  QToolTip::add( createFileButton, tr( "Click to create new data source directly to file." ) );
212  QWhatsThis::add( createFileButton, tr( "Use to create new data source to file only." ) );
213  createNTupleButton->setText( tr( "Create NTuple" ) );
214  QToolTip::add( createNTupleButton, tr( "Create new data source in memory" ) );
215  QWhatsThis::add( createNTupleButton, tr( "Use to create new data source in memory only." ) );
216  cancelButton->setText( tr( "Cancel" ) );
217 }
218 
220 {
221  qWarning( "CreateNTupleBase::cutListCheckBox_toggled(bool): Not implemented yet" );
222 }
223 
225 {
226  qWarning( "CreateNTupleBase::columnListCheckBox_toggled(bool): Not implemented yet" );
227 }
228 
QVBoxLayout * layout9
QListView * m_ColumnListView
QCheckBox * columnListCheckBox
QVBoxLayout * layout10
loadFromData(const uchar *buf, uint len, const char *format=0)
setResizeMode(ResizeMode m)
setAlignment(int)
setAllColumnsShowFocus(bool)
virtual void currentDataSourceChanged(int item)=0
QPushButton * createFileButton
add(QWidget *widget, const QString &text)
QHBoxLayout * layout7
virtual void columnListCheckBox_toggled(bool)
setGeometry(int x, int y, int w, int h)
static const unsigned char image0_data[]
QHBoxLayout * layout8
QComboBox * m_ntuple_in
setText(const QString &)
QPushButton * createNTupleButton
QCheckBox * cutListCheckBox
setText(const QString &)
QPushButton * cancelButton
setText(const QString &)
QLineEdit * m_ntuple_out
setTreeStepSize(int)
CreateNTupleBase(QWidget *parent=0, const char *name=0, bool modal=FALSE, WFlags fl=0)
QListView * m_CutListView
setRootIsDecorated(bool)
virtual void cutListCheckBox_toggled(bool)
add(QWidget *widget, const QString &text)
virtual void languageChange()
setInsertionPolicy(Policy policy)
virtual void createButtonClicked()=0
setEditable(bool)
virtual void createFileButtonClicked()=0

Generated for HippoDraw Class Library by doxygen