00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "PickTableBase.h"
00011
00012 #include <qvariant.h>
00013 #include <qlabel.h>
00014 #include <qpushbutton.h>
00015 #include <qheader.h>
00016 #include <qlistview.h>
00017 #include <qcheckbox.h>
00018 #include <qlineedit.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 #include <qimage.h>
00023 #include <qpixmap.h>
00024
00025 static const char* const image0_data[] = {
00026 "48 48 6 1",
00027 ". c None",
00028 "b c #0000f6",
00029 "# c #525052",
00030 "d c #a4a1a4",
00031 "c c #f60000",
00032 "a c #f6f2f6",
00033 "................................................",
00034 "....#..............##....#..#...##.#............",
00035 "..#..#...............#.#.#..#.#....##...........",
00036 ".............................#..................",
00037 "................................................",
00038 "..##............................................",
00039 ".#.....aaaa.aaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaa..",
00040 "...#...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..",
00041 ".......aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..",
00042 ".......aaaaaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaa..",
00043 ".......aaaaaaaaaa..aabbbbbbbbbbaaaabbbbbbbbbba..",
00044 ".......aaaaaaaaaa..aaaabbbbbbaaaaaaaabbbbbbaaa..",
00045 "....#..aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00046 ".#.....aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00047 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00048 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00049 ".........aaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaa....",
00050 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00051 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00052 ".......aaaaaaaaa...aaaaabbbbaaaaaaaaaabbbbaaaa..",
00053 "...#...aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00054 "....#..aaaaaaaaa.c.aaaaabbbbbbbbbbbbbbbbbbaaaa..",
00055 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00056 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00057 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00058 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00059 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00060 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00061 ".#.#...aaaaaaaaa.c..aaaabbbbaaaaaaaaaabbbbaaaa..",
00062 ".........aaaaaaa.cc.aaaabbbbaaaaaaaaaabbbbaaaa..",
00063 ".......aaaaaaaaa.cc.aaaabbbbaaaaaaaaaabbbbaa....",
00064 ".......aaaaaaaaa.cc.aaaabbbbaaaaaaaaaabbbbaaaa..",
00065 ".......aaaaaaaaa.cc.aaabbbbbbaaaaaaaabbbbbbaaa..",
00066 ".......aaaaaaaaa.cc.abbbbbbbbbbaaaabbbbbbbbbba..",
00067 ".......aaaaaaaa..cc.aaaaaaaaaaaaaaaaaaaaaaaaaa..",
00068 ".#.....aaaaaaaa.ccc..aaaaaaaaaaaaaaaaaaaaaaaaa..",
00069 ".......aaaaaaaa.cccc.aaaaaaaaaaaaaaaaaaaaaaaaa..",
00070 ".......aaaaaaa..cccc.aaaaaa.aaaaaaaaaaaaaaaaaa..",
00071 ".......aaaaaaa.ccccc..aaaaa.aaaaaaaaaaaaaa.aaa..",
00072 ".......aaaaaa..cccccc..aaaa..aaaa.aaaaa..a.aaa..",
00073 ".......aaaa...ccccccc..a..a....aa..aa.a..a.a.a..",
00074 ".......aa....ccccccccc.......d...............a..",
00075 ".#..............................................",
00076 ".....#........#.......#.#..............#.#......",
00077 "...#.#..........................................",
00078 "................................................",
00079 "................................................",
00080 "................................................"};
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 PickTableBase::PickTableBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00091 : QDialog( parent, name, modal, fl ),
00092 image0( (const char **) image0_data )
00093 {
00094 if ( !name )
00095 setName( "PickTableBase" );
00096 setIcon( image0 );
00097
00098 m_type = new QLabel( this, "m_type" );
00099 m_type->setGeometry( QRect( 207, 11, 302, 16 ) );
00100
00101 m_clear = new QPushButton( this, "m_clear" );
00102 m_clear->setGeometry( QRect( 317, 365, 80, 32 ) );
00103
00104 m_delete = new QPushButton( this, "m_delete" );
00105 m_delete->setGeometry( QRect( 403, 365, 106, 32 ) );
00106
00107 m_title = new QLabel( this, "m_title" );
00108 m_title->setGeometry( QRect( 11, 11, 190, 16 ) );
00109
00110 m_pick_table = new QListView( this, "m_pick_table" );
00111 m_pick_table->addColumn( tr( "Item number" ) );
00112 m_pick_table->addColumn( tr( "X Value" ) );
00113 m_pick_table->addColumn( tr( "Y Value" ) );
00114 m_pick_table->addColumn( tr( "Z Value" ) );
00115 m_pick_table->setGeometry( QRect( 11, 33, 498, 290 ) );
00116 m_pick_table->setAllColumnsShowFocus( TRUE );
00117 m_pick_table->setShowSortIndicator( TRUE );
00118 m_pick_table->setItemMargin( 2 );
00119 m_pick_table->setResizeMode( QListView::AllColumns );
00120 m_pick_table->setTreeStepSize( 30 );
00121
00122 m_pickedCheckBox = new QCheckBox( this, "m_pickedCheckBox" );
00123 m_pickedCheckBox->setGeometry( QRect( 10, 360, 150, 31 ) );
00124 m_pickedCheckBox->setChecked( TRUE );
00125
00126 xLineEdit = new QLineEdit( this, "xLineEdit" );
00127 xLineEdit->setGeometry( QRect( 111, 331, 90, 24 ) );
00128 xLineEdit->setFrameShape( QLineEdit::LineEditPanel );
00129 xLineEdit->setFrameShadow( QLineEdit::Sunken );
00130
00131 yLineEdit = new QLineEdit( this, "yLineEdit" );
00132 yLineEdit->setGeometry( QRect( 207, 331, 90, 24 ) );
00133
00134 zLineEdit = new QLineEdit( this, "zLineEdit" );
00135 zLineEdit->setGeometry( QRect( 303, 331, 90, 24 ) );
00136
00137 wLineEdit = new QLineEdit( this, "wLineEdit" );
00138 wLineEdit->setGeometry( QRect( 399, 331, 90, 24 ) );
00139
00140 m_add_entry = new QPushButton( this, "m_add_entry" );
00141 m_add_entry->setGeometry( QRect( 10, 331, 80, 25 ) );
00142 languageChange();
00143 resize( QSize(520, 406).expandedTo(minimumSizeHint()) );
00144 clearWState( WState_Polished );
00145
00146
00147 connect( m_clear, SIGNAL( clicked() ), this, SLOT( clear() ) );
00148 connect( m_delete, SIGNAL( clicked() ), this, SLOT( deleteSelectedItem() ) );
00149 connect( m_pick_table, SIGNAL( selectionChanged() ), this, SLOT( m_pick_table_selectionChanged() ) );
00150 connect( m_add_entry, SIGNAL( clicked() ), this, SLOT( addEntry() ) );
00151 connect( m_pickedCheckBox, SIGNAL( clicked() ), this, SLOT( pickedCheckBoxClicked() ) );
00152
00153
00154 setTabOrder( xLineEdit, yLineEdit );
00155 setTabOrder( yLineEdit, zLineEdit );
00156 setTabOrder( zLineEdit, wLineEdit );
00157 setTabOrder( wLineEdit, m_add_entry );
00158 setTabOrder( m_add_entry, m_clear );
00159 setTabOrder( m_clear, m_delete );
00160 setTabOrder( m_delete, m_pick_table );
00161 }
00162
00163
00164
00165
00166 PickTableBase::~PickTableBase()
00167 {
00168
00169 }
00170
00171
00172
00173
00174
00175 void PickTableBase::languageChange()
00176 {
00177 setCaption( tr( "Pick table" ) );
00178 m_type->setText( tr( "Plot Type" ) );
00179 m_clear->setText( tr( "Clear" ) );
00180 m_delete->setText( tr( "Delete selected" ) );
00181 m_title->setText( tr( "Plot Title" ) );
00182 m_pick_table->header()->setLabel( 0, tr( "Item number" ) );
00183 m_pick_table->header()->setLabel( 1, tr( "X Value" ) );
00184 m_pick_table->header()->setLabel( 2, tr( "Y Value" ) );
00185 m_pick_table->header()->setLabel( 3, tr( "Z Value" ) );
00186 m_pickedCheckBox->setText( tr( "Show picked points" ) );
00187 m_add_entry->setText( tr( "Add entry" ) );
00188 }
00189