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