PickTableBase.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 ** Form implementation generated from reading ui file 'PickTableBase.ui'
3 **
4 ** Created by User Interface Compiler
5 **
6 ** WARNING! All changes made in this file will be lost!
7 ****************************************************************************/
8 
9 #include "PickTableBase.h"
10 
11 #include <qvariant.h>
12 #include <qlabel.h>
13 #include <qpushbutton.h>
14 #include <qheader.h>
15 #include <qlistview.h>
16 #include <qcheckbox.h>
17 #include <qlineedit.h>
18 #include <qlayout.h>
19 #include <qtooltip.h>
20 #include <qwhatsthis.h>
21 #include <qimage.h>
22 #include <qpixmap.h>
23 
24 static const char* const image0_data[] = {
25 "48 48 6 1",
26 ". c None",
27 "b c #0000f6",
28 "# c #525052",
29 "d c #a4a1a4",
30 "c c #f60000",
31 "a c #f6f2f6",
32 "................................................",
33 "....#..............##....#..#...##.#............",
34 "..#..#...............#.#.#..#.#....##...........",
35 ".............................#..................",
36 "................................................",
37 "..##............................................",
38 ".#.....aaaa.aaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaa..",
39 "...#...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..",
40 ".......aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..",
41 ".......aaaaaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaa..",
42 ".......aaaaaaaaaa..aabbbbbbbbbbaaaabbbbbbbbbba..",
43 ".......aaaaaaaaaa..aaaabbbbbbaaaaaaaabbbbbbaaa..",
44 "....#..aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
45 ".#.....aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
46 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
47 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
48 ".........aaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaa....",
49 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
50 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
51 ".......aaaaaaaaa...aaaaabbbbaaaaaaaaaabbbbaaaa..",
52 "...#...aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
53 "....#..aaaaaaaaa.c.aaaaabbbbbbbbbbbbbbbbbbaaaa..",
54 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
55 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
56 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
57 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
58 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
59 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
60 ".#.#...aaaaaaaaa.c..aaaabbbbaaaaaaaaaabbbbaaaa..",
61 ".........aaaaaaa.cc.aaaabbbbaaaaaaaaaabbbbaaaa..",
62 ".......aaaaaaaaa.cc.aaaabbbbaaaaaaaaaabbbbaa....",
63 ".......aaaaaaaaa.cc.aaaabbbbaaaaaaaaaabbbbaaaa..",
64 ".......aaaaaaaaa.cc.aaabbbbbbaaaaaaaabbbbbbaaa..",
65 ".......aaaaaaaaa.cc.abbbbbbbbbbaaaabbbbbbbbbba..",
66 ".......aaaaaaaa..cc.aaaaaaaaaaaaaaaaaaaaaaaaaa..",
67 ".#.....aaaaaaaa.ccc..aaaaaaaaaaaaaaaaaaaaaaaaa..",
68 ".......aaaaaaaa.cccc.aaaaaaaaaaaaaaaaaaaaaaaaa..",
69 ".......aaaaaaa..cccc.aaaaaa.aaaaaaaaaaaaaaaaaa..",
70 ".......aaaaaaa.ccccc..aaaaa.aaaaaaaaaaaaaa.aaa..",
71 ".......aaaaaa..cccccc..aaaa..aaaa.aaaaa..a.aaa..",
72 ".......aaaa...ccccccc..a..a....aa..aa.a..a.a.a..",
73 ".......aa....ccccccccc.......d...............a..",
74 ".#..............................................",
75 ".....#........#.......#.#..............#.#......",
76 "...#.#..........................................",
77 "................................................",
78 "................................................",
79 "................................................"};
80 
81 
82 /*
83  * Constructs a PickTableBase as a child of 'parent', with the
84  * name 'name' and widget flags set to 'f'.
85  *
86  * The dialog will by default be modeless, unless you set 'modal' to
87  * TRUE to construct a modal dialog.
88  */
89 PickTableBase::PickTableBase( QWidget* parent, const char* name, bool modal, WFlags fl )
90  : QDialog( parent, name, modal, fl ),
91  image0( (const char **) image0_data )
92 {
93  if ( !name )
94  setName( "PickTableBase" );
95  setIcon( image0 );
96 
97  m_type = new QLabel( this, "m_type" );
98  m_type->setGeometry( QRect( 207, 11, 302, 16 ) );
99 
100  m_clear = new QPushButton( this, "m_clear" );
101  m_clear->setGeometry( QRect( 317, 365, 80, 32 ) );
102 
103  m_delete = new QPushButton( this, "m_delete" );
104  m_delete->setGeometry( QRect( 403, 365, 106, 32 ) );
105 
106  m_title = new QLabel( this, "m_title" );
107  m_title->setGeometry( QRect( 11, 11, 190, 16 ) );
108 
109  m_pick_table = new QListView( this, "m_pick_table" );
110  m_pick_table->addColumn( tr( "Item number" ) );
111  m_pick_table->addColumn( tr( "X Value" ) );
112  m_pick_table->addColumn( tr( "Y Value" ) );
113  m_pick_table->addColumn( tr( "Z Value" ) );
114  m_pick_table->setGeometry( QRect( 11, 33, 498, 290 ) );
118  m_pick_table->setResizeMode( QListView::AllColumns );
120 
121  m_pickedCheckBox = new QCheckBox( this, "m_pickedCheckBox" );
122  m_pickedCheckBox->setGeometry( QRect( 10, 360, 150, 31 ) );
123  m_pickedCheckBox->setChecked( TRUE );
124 
125  xLineEdit = new QLineEdit( this, "xLineEdit" );
126  xLineEdit->setGeometry( QRect( 111, 331, 90, 24 ) );
127  xLineEdit->setFrameShape( QLineEdit::LineEditPanel );
128  xLineEdit->setFrameShadow( QLineEdit::Sunken );
129 
130  yLineEdit = new QLineEdit( this, "yLineEdit" );
131  yLineEdit->setGeometry( QRect( 207, 331, 90, 24 ) );
132 
133  zLineEdit = new QLineEdit( this, "zLineEdit" );
134  zLineEdit->setGeometry( QRect( 303, 331, 90, 24 ) );
135 
136  wLineEdit = new QLineEdit( this, "wLineEdit" );
137  wLineEdit->setGeometry( QRect( 399, 331, 90, 24 ) );
138 
139  m_add_entry = new QPushButton( this, "m_add_entry" );
140  m_add_entry->setGeometry( QRect( 10, 331, 80, 25 ) );
141  languageChange();
142  resize( QSize(520, 406).expandedTo(minimumSizeHint()) );
143  clearWState( WState_Polished );
144 
145  // signals and slots connections
146  connect( m_clear, SIGNAL( clicked() ), this, SLOT( clear() ) );
147  connect( m_delete, SIGNAL( clicked() ), this, SLOT( deleteSelectedItem() ) );
148  connect( m_pick_table, SIGNAL( selectionChanged() ), this, SLOT( m_pick_table_selectionChanged() ) );
149  connect( m_add_entry, SIGNAL( clicked() ), this, SLOT( addEntry() ) );
150  connect( m_pickedCheckBox, SIGNAL( clicked() ), this, SLOT( pickedCheckBoxClicked() ) );
151 
152  // tab order
153  setTabOrder( xLineEdit, yLineEdit );
154  setTabOrder( yLineEdit, zLineEdit );
155  setTabOrder( zLineEdit, wLineEdit );
156  setTabOrder( wLineEdit, m_add_entry );
157  setTabOrder( m_add_entry, m_clear );
158  setTabOrder( m_clear, m_delete );
159  setTabOrder( m_delete, m_pick_table );
160 }
161 
162 /*
163  * Destroys the object and frees any allocated resources
164  */
166 {
167  // no need to delete child widgets, Qt does it all for us
168 }
169 
170 /*
171  * Sets the strings of the subwidgets using the current
172  * language.
173  */
175 {
176  setCaption( tr( "Pick table" ) );
177  m_type->setText( tr( "Plot Type" ) );
178  m_clear->setText( tr( "Clear" ) );
179  m_delete->setText( tr( "Delete selected" ) );
180  m_title->setText( tr( "Plot Title" ) );
181  m_pick_table->header()->setLabel( 0, tr( "Item number" ) );
182  m_pick_table->header()->setLabel( 1, tr( "X Value" ) );
183  m_pick_table->header()->setLabel( 2, tr( "Y Value" ) );
184  m_pick_table->header()->setLabel( 3, tr( "Z Value" ) );
185  m_pickedCheckBox->setText( tr( "Show picked points" ) );
186  m_add_entry->setText( tr( "Add entry" ) );
187 }
188 

Generated for HippoDraw Class Library by doxygen