PlotTableBase.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file '../../hippodraw/qtui/PlotTableBase.ui'
00003 **
00004 ** Created: Fri Oct 26 09:36:33 2007
00005 **      by: The User Interface Compiler ($Id: PlotTableBase_8cpp-source.html,v 1.40 2008/03/24 19:27:33 pfkeb Exp $)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 
00010 #include "PlotTableBase.h"
00011 
00012 #include <qvariant.h>
00013 #include <qpushbutton.h>
00014 #include <qheader.h>
00015 #include <qlistview.h>
00016 #include <qlayout.h>
00017 #include <qtooltip.h>
00018 #include <qwhatsthis.h>
00019 #include <qimage.h>
00020 #include <qpixmap.h>
00021 
00022 static const char* const image0_data[] = { 
00023 "48 48 6 1",
00024 ". c None",
00025 "b c #0000f0",
00026 "# c #505050",
00027 "d c #a0a0a0",
00028 "c c #f00000",
00029 "a c #f0f0f0",
00030 "................................................",
00031 "....#..............##....#..#...##.#............",
00032 "..#..#...............#.#.#..#.#....##...........",
00033 ".............................#..................",
00034 "................................................",
00035 "..##............................................",
00036 ".#.....aaaa.aaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaa..",
00037 "...#...aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..",
00038 ".......aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa..",
00039 ".......aaaaaaaaaa..aaaaaaaaaaaaaaaaaaaaaaaaaaa..",
00040 ".......aaaaaaaaaa..aabbbbbbbbbbaaaabbbbbbbbbba..",
00041 ".......aaaaaaaaaa..aaaabbbbbbaaaaaaaabbbbbbaaa..",
00042 "....#..aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00043 ".#.....aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00044 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00045 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00046 ".........aaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaa....",
00047 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00048 ".......aaaaaaaaaa..aaaaabbbbaaaaaaaaaabbbbaaaa..",
00049 ".......aaaaaaaaa...aaaaabbbbaaaaaaaaaabbbbaaaa..",
00050 "...#...aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00051 "....#..aaaaaaaaa.c.aaaaabbbbbbbbbbbbbbbbbbaaaa..",
00052 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00053 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00054 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00055 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00056 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00057 ".......aaaaaaaaa.c.aaaaabbbbaaaaaaaaaabbbbaaaa..",
00058 ".#.#...aaaaaaaaa.c..aaaabbbbaaaaaaaaaabbbbaaaa..",
00059 ".........aaaaaaa.cc.aaaabbbbaaaaaaaaaabbbbaaaa..",
00060 ".......aaaaaaaaa.cc.aaaabbbbaaaaaaaaaabbbbaa....",
00061 ".......aaaaaaaaa.cc.aaaabbbbaaaaaaaaaabbbbaaaa..",
00062 ".......aaaaaaaaa.cc.aaabbbbbbaaaaaaaabbbbbbaaa..",
00063 ".......aaaaaaaaa.cc.abbbbbbbbbbaaaabbbbbbbbbba..",
00064 ".......aaaaaaaa..cc.aaaaaaaaaaaaaaaaaaaaaaaaaa..",
00065 ".#.....aaaaaaaa.ccc..aaaaaaaaaaaaaaaaaaaaaaaaa..",
00066 ".......aaaaaaaa.cccc.aaaaaaaaaaaaaaaaaaaaaaaaa..",
00067 ".......aaaaaaa..cccc.aaaaaa.aaaaaaaaaaaaaaaaaa..",
00068 ".......aaaaaaa.ccccc..aaaaa.aaaaaaaaaaaaaa.aaa..",
00069 ".......aaaaaa..cccccc..aaaa..aaaa.aaaaa..a.aaa..",
00070 ".......aaaa...ccccccc..a..a....aa..aa.a..a.a.a..",
00071 ".......aa....ccccccccc.......d...............a..",
00072 ".#..............................................",
00073 ".....#........#.......#.#..............#.#......",
00074 "...#.#..........................................",
00075 "................................................",
00076 "................................................",
00077 "................................................"};
00078 
00079 
00080 /* 
00081  *  Constructs a PlotTableBase as a child of 'parent', with the 
00082  *  name 'name' and widget flags set to 'f'.
00083  *
00084  *  The dialog will by default be modeless, unless you set 'modal' to
00085  *  TRUE to construct a modal dialog.
00086  */
00087 PlotTableBase::PlotTableBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00088     : QDialog( parent, name, modal, fl ),
00089       image0( (const char **) image0_data )
00090 {
00091     if ( !name )
00092         setName( "PlotTableBase" );
00093     setIcon( image0 );
00094     PlotTableBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "PlotTableBaseLayout"); 
00095 
00096     closeButton = new QPushButton( this, "closeButton" );
00097 
00098     PlotTableBaseLayout->addWidget( closeButton, 1, 2 );
00099 
00100     copyButton = new QPushButton( this, "copyButton" );
00101     copyButton->setEnabled( FALSE );
00102 
00103     PlotTableBaseLayout->addWidget( copyButton, 1, 0 );
00104 
00105     m_plot_table = new QListView( this, "m_plot_table" );
00106     m_plot_table->addColumn( tr( "Title" ) );
00107     m_plot_table->addColumn( tr( "Type" ) );
00108     m_plot_table->addColumn( tr( "X axis" ) );
00109     m_plot_table->addColumn( tr( "Y axis" ) );
00110     m_plot_table->addColumn( tr( "Z axis" ) );
00111     m_plot_table->setBackgroundOrigin( QListView::WidgetOrigin );
00112     m_plot_table->setFrameShape( QListView::StyledPanel );
00113     m_plot_table->setFrameShadow( QListView::Sunken );
00114     m_plot_table->setResizePolicy( QScrollView::Manual );
00115     m_plot_table->setAllColumnsShowFocus( TRUE );
00116     m_plot_table->setShowSortIndicator( TRUE );
00117     m_plot_table->setItemMargin( 2 );
00118     m_plot_table->setResizeMode( QListView::AllColumns );
00119 
00120     PlotTableBaseLayout->addMultiCellWidget( m_plot_table, 0, 0, 0, 2 );
00121     QSpacerItem* spacer = new QSpacerItem( 311, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00122     PlotTableBaseLayout->addItem( spacer, 1, 1 );
00123     languageChange();
00124     resize( QSize(529, 352).expandedTo(minimumSizeHint()) );
00125     clearWState( WState_Polished );
00126 
00127     // signals and slots connections
00128     connect( m_plot_table, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( selectionChanged(QListViewItem*) ) );
00129     connect( closeButton, SIGNAL( clicked() ), this, SLOT( close() ) );
00130     connect( copyButton, SIGNAL( clicked() ), this, SLOT( copyButton_clicked() ) );
00131     connect( closeButton, SIGNAL( clicked() ), this, SLOT( closeButton_clicked() ) );
00132 }
00133 
00134 /*
00135  *  Destroys the object and frees any allocated resources
00136  */
00137 PlotTableBase::~PlotTableBase()
00138 {
00139     // no need to delete child widgets, Qt does it all for us
00140 }
00141 
00142 /*
00143  *  Sets the strings of the subwidgets using the current
00144  *  language.
00145  */
00146 void PlotTableBase::languageChange()
00147 {
00148     setCaption( tr( "Plot table" ) );
00149     closeButton->setText( tr( "Close" ) );
00150     copyButton->setText( tr( "Copy" ) );
00151     m_plot_table->header()->setLabel( 0, tr( "Title" ) );
00152     m_plot_table->header()->setLabel( 1, tr( "Type" ) );
00153     m_plot_table->header()->setLabel( 2, tr( "X axis" ) );
00154     m_plot_table->header()->setLabel( 3, tr( "Y axis" ) );
00155     m_plot_table->header()->setLabel( 4, tr( "Z axis" ) );
00156     m_plot_table->clear();
00157     QListViewItem * item = new QListViewItem( m_plot_table, 0 );
00158     item->setText( 0, tr( "New Item" ) );
00159 
00160 }
00161 

Generated for HippoDraw Class Library by doxygen