Qtopia library API Documentation

lnkpropertiesbase_p.cpp

00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'lnkpropertiesbase_p.ui'
00003 **
00004 ** Created: Sun Jan 11 13:35:26 2004
00005 **      by:  The User Interface Compiler (uic)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 #include "lnkpropertiesbase_p.h"
00010 
00011 #include <qbuttongroup.h>
00012 #include <qcheckbox.h>
00013 #include <qcombobox.h>
00014 #include <qframe.h>
00015 #include <qlabel.h>
00016 #include <qlineedit.h>
00017 #include <qpe/categorywidget.h>
00018 #include <qpushbutton.h>
00019 #include <qtoolbutton.h>
00020 #include <qlayout.h>
00021 #include <qvariant.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 #include <qimage.h>
00025 #include <qpixmap.h>
00026 
00027 static const char* const image0_data[] = { 
00028 "32 32 2 1",
00029 ". c None",
00030 "# c #000000",
00031 "................................",
00032 "................................",
00033 "................................",
00034 "................................",
00035 "................................",
00036 "................................",
00037 "................................",
00038 "..........###...................",
00039 "...........##...................",
00040 "...........##...................",
00041 "...........##...................",
00042 "...........##...................",
00043 "...........##...................",
00044 "..####.##..##.####.....#####....",
00045 ".########..########...#######...",
00046 "###...###..###...###.###...##...",
00047 "##.....##..##.....##.##.........",
00048 "##.....##..##.....##.##.........",
00049 "##.....##..##.....##.##.........",
00050 "###...###..###...###.###...##...",
00051 ".########..########...#######.##",
00052 "..####.##.###.####.....#####..##",
00053 "................................",
00054 "................................",
00055 "................................",
00056 "................................",
00057 "................................",
00058 "................................",
00059 "................................",
00060 "................................",
00061 "................................",
00062 "................................"};
00063 
00064 static const char* const image1_data[] = { 
00065 "32 32 2 1",
00066 ". c None",
00067 "# c #000000",
00068 "....................##..........",
00069 "....................##..........",
00070 "................................",
00071 "..............##...##...........",
00072 ".............###...###..........",
00073 ".............##.....##..........",
00074 ".............##.....##..........",
00075 ".............##.....##..........",
00076 ".............###...###..........",
00077 "..............#######...........",
00078 "...............#####............",
00079 "................................",
00080 "...............#####............",
00081 "..............#######...........",
00082 ".............###...###..........",
00083 ".............##.....##..........",
00084 ".............##.....##..........",
00085 ".............##.....##..........",
00086 "..............##...##...........",
00087 ".......###############..........",
00088 ".......###############..........",
00089 ".......#.............#..........",
00090 "................................",
00091 ".............#########..........",
00092 ".............#########..........",
00093 "..............##...##...........",
00094 ".............##.....##..........",
00095 ".............##.....##..........",
00096 ".............##.....##..........",
00097 ".............###...###..........",
00098 "..............#######...........",
00099 "...............#####............"};
00100 
00101 static const char* const image2_data[] = { 
00102 "32 32 2 1",
00103 ". c None",
00104 "# c #000000",
00105 "................................",
00106 "................................",
00107 "................................",
00108 "................................",
00109 "................................",
00110 "................................",
00111 "................................",
00112 "................................",
00113 "................................",
00114 "................................",
00115 "##..#####.....####.###.##.####..",
00116 "##.#######...########..########.",
00117 "...##...###.###...###..###...###",
00118 ".........##.##.....##..##.....##",
00119 ".........##.##.....##..##.....##",
00120 ".........##.##.....##..##.....##",
00121 "...##...###.###...###..###...###",
00122 "...#######...########..########.",
00123 "....#####.....####.##..##.####..",
00124 "...................##...........",
00125 "...................##...........",
00126 "...................##...........",
00127 "...................##...........",
00128 "...................##...........",
00129 "...................###..........",
00130 "................................",
00131 "................................",
00132 "................................",
00133 "................................",
00134 "................................",
00135 "................................",
00136 "................................"};
00137 
00138 static const char* const image3_data[] = { 
00139 "32 32 2 1",
00140 ". c None",
00141 "# c #000000",
00142 "............#####...............",
00143 "...........#######..............",
00144 "..........###...###.............",
00145 "..........##.....##.............",
00146 "..........##.....##.............",
00147 "..........##.....##.............",
00148 "...........##...##..............",
00149 "..........#########.............",
00150 "..........#########.............",
00151 "................................",
00152 "..........#.............#.......",
00153 "..........###############.......",
00154 "..........###############.......",
00155 "...........##...##..............",
00156 "..........##.....##.............",
00157 "..........##.....##.............",
00158 "..........##.....##.............",
00159 "..........###...###.............",
00160 "...........#######..............",
00161 "............#####...............",
00162 "................................",
00163 "............#####...............",
00164 "...........#######..............",
00165 "..........###...###.............",
00166 "..........##.....##.............",
00167 "..........##.....##.............",
00168 "..........##.....##.............",
00169 "..........###...###.............",
00170 "...........##...##..............",
00171 "................................",
00172 "..........##....................",
00173 "..........##...................."};
00174 
00175 
00176 /* 
00177  *  Constructs a LnkPropertiesBase which is a child of 'parent', with the 
00178  *  name 'name' and widget flags set to 'f' 
00179  */
00180 LnkPropertiesBase::LnkPropertiesBase( QWidget* parent,  const char* name, WFlags fl )
00181     : QWidget( parent, name, fl )
00182 {
00183     QPixmap image0( ( const char** ) image0_data );
00184     QPixmap image1( ( const char** ) image1_data );
00185     QPixmap image2( ( const char** ) image2_data );
00186     QPixmap image3( ( const char** ) image3_data );
00187     if ( !name )
00188     setName( "Form1" );
00189     resize( 263, 450 ); 
00190     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, sizePolicy().hasHeightForWidth() ) );
00191     QFont f( font() );
00192     setFont( f ); 
00193     setCaption( tr( "Details" ) );
00194     setIcon( image0 );
00195     Form1Layout = new QVBoxLayout( this ); 
00196     Form1Layout->setSpacing( 0 );
00197     Form1Layout->setMargin( 0 );
00198 
00199     Frame8 = new QFrame( this, "Frame8" );
00200     Frame8->setFocusPolicy( QFrame::NoFocus );
00201     Frame8->setFrameShape( QFrame::NoFrame );
00202     Frame8->setFrameShadow( QFrame::Plain );
00203     Frame8Layout = new QGridLayout( Frame8 ); 
00204     Frame8Layout->setSpacing( 3 );
00205     Frame8Layout->setMargin( 3 );
00206 
00207     categoryEdit = new CategoryWidget( Frame8, "categoryEdit" );
00208     categoryEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)7, categoryEdit->sizePolicy().hasHeightForWidth() ) );
00209 
00210     Frame8Layout->addMultiCellWidget( categoryEdit, 8, 8, 0, 1 );
00211 
00212     rotate = new QCheckBox( Frame8, "rotate" );
00213     rotate->setText( tr( "Use custom rotation" ) );
00214     QWhatsThis::add(  rotate, tr( "Preload this application so that it is available instantly." ) );
00215 
00216     Frame8Layout->addMultiCellWidget( rotate, 5, 5, 0, 1 );
00217 
00218     docname = new QLineEdit( Frame8, "docname" );
00219     docname->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, docname->sizePolicy().hasHeightForWidth() ) );
00220     docname->setText( tr( "" ) );
00221     QWhatsThis::add(  docname, tr( "The name of this document." ) );
00222 
00223     Frame8Layout->addWidget( docname, 0, 1 );
00224 
00225     locationCombo = new QComboBox( FALSE, Frame8, "locationCombo" );
00226     locationCombo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, locationCombo->sizePolicy().hasHeightForWidth() ) );
00227     QWhatsThis::add(  locationCombo, tr( "The media the document resides on." ) );
00228 
00229     Frame8Layout->addWidget( locationCombo, 1, 1 );
00230 
00231     typeLabel = new QLabel( Frame8, "typeLabel" );
00232     typeLabel->setFocusPolicy( QLabel::NoFocus );
00233     typeLabel->setText( tr( "Type:" ) );
00234     typeLabel->setTextFormat( QLabel::RichText );
00235 
00236     Frame8Layout->addWidget( typeLabel, 2, 0 );
00237 
00238     type = new QLabel( Frame8, "type" );
00239     type->setText( tr( "" ) );
00240 
00241     Frame8Layout->addWidget( type, 2, 1 );
00242 
00243     locationLabel = new QLabel( Frame8, "locationLabel" );
00244     locationLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, locationLabel->sizePolicy().hasHeightForWidth() ) );
00245     locationLabel->setCaption( tr( "" ) );
00246     locationLabel->setText( tr( "Location:" ) );
00247 
00248     Frame8Layout->addWidget( locationLabel, 1, 0 );
00249 
00250     TextLabel1 = new QLabel( Frame8, "TextLabel1" );
00251     TextLabel1->setFrameShadow( QLabel::MShadow );
00252     TextLabel1->setText( tr( "Name:" ) );
00253 
00254     Frame8Layout->addWidget( TextLabel1, 0, 0 );
00255 
00256     comment = new QLabel( Frame8, "comment" );
00257     comment->setText( tr( "" ) );
00258 
00259     Frame8Layout->addWidget( comment, 3, 1 );
00260 
00261     rotateButtons = new QButtonGroup( Frame8, "rotateButtons" );
00262     rotateButtons->setFrameShape( QButtonGroup::NoFrame );
00263     rotateButtons->setTitle( tr( "" ) );
00264     rotateButtons->setExclusive( TRUE );
00265     rotateButtons->setColumnLayout(0, Qt::Vertical );
00266     rotateButtons->layout()->setSpacing( 0 );
00267     rotateButtons->layout()->setMargin( 0 );
00268     rotateButtonsLayout = new QHBoxLayout( rotateButtons->layout() );
00269     rotateButtonsLayout->setAlignment( Qt::AlignTop );
00270     rotateButtonsLayout->setSpacing( 3 );
00271     rotateButtonsLayout->setMargin( 0 );
00272     QSpacerItem* spacer = new QSpacerItem( 20, 28, QSizePolicy::Fixed, QSizePolicy::Minimum );
00273     rotateButtonsLayout->addItem( spacer );
00274 
00275     ToolButton1 = new QToolButton( rotateButtons, "ToolButton1" );
00276     ToolButton1->setText( tr( "" ) );
00277     ToolButton1->setPixmap( image0 );
00278     ToolButton1->setToggleButton( TRUE );
00279     ToolButton1->setOn( FALSE );
00280     ToolButton1->setUsesBigPixmap( TRUE );
00281     ToolButton1->setToggleButton( TRUE );
00282     ToolButton1->setOn( FALSE );
00283     rotateButtons->insert( ToolButton1, 0 );
00284     rotateButtonsLayout->addWidget( ToolButton1 );
00285 
00286     ToolButton2 = new QToolButton( rotateButtons, "ToolButton2" );
00287     ToolButton2->setText( tr( "" ) );
00288     ToolButton2->setPixmap( image1 );
00289     ToolButton2->setToggleButton( TRUE );
00290     ToolButton2->setUsesBigPixmap( TRUE );
00291     ToolButton2->setToggleButton( TRUE );
00292     rotateButtons->insert( ToolButton2, 1 );
00293     rotateButtonsLayout->addWidget( ToolButton2 );
00294 
00295     ToolButton3 = new QToolButton( rotateButtons, "ToolButton3" );
00296     ToolButton3->setText( tr( "" ) );
00297     ToolButton3->setPixmap( image2 );
00298     ToolButton3->setToggleButton( TRUE );
00299     ToolButton3->setUsesBigPixmap( TRUE );
00300     ToolButton3->setToggleButton( TRUE );
00301     rotateButtons->insert( ToolButton3, 2 );
00302     rotateButtonsLayout->addWidget( ToolButton3 );
00303 
00304     ToolButton4 = new QToolButton( rotateButtons, "ToolButton4" );
00305     ToolButton4->setText( tr( "" ) );
00306     ToolButton4->setPixmap( image3 );
00307     ToolButton4->setToggleButton( TRUE );
00308     ToolButton4->setUsesBigPixmap( TRUE );
00309     ToolButton4->setToggleButton( TRUE );
00310     rotateButtons->insert( ToolButton4, 3 );
00311     rotateButtonsLayout->addWidget( ToolButton4 );
00312     QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
00313     rotateButtonsLayout->addItem( spacer_2 );
00314 
00315     Frame8Layout->addMultiCellWidget( rotateButtons, 6, 6, 0, 1 );
00316 
00317     labelspacer = new QLabel( Frame8, "labelspacer" );
00318     labelspacer->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)7, labelspacer->sizePolicy().hasHeightForWidth() ) );
00319     labelspacer->setText( tr( "" ) );
00320 
00321     Frame8Layout->addMultiCellWidget( labelspacer, 7, 7, 0, 1 );
00322 
00323     preload = new QCheckBox( Frame8, "preload" );
00324     preload->setText( tr( "Fast load (consumes memory)" ) );
00325     QWhatsThis::add(  preload, tr( "Preload this application so that it is available instantly." ) );
00326 
00327     Frame8Layout->addMultiCellWidget( preload, 4, 4, 0, 1 );
00328 
00329     commentLabel = new QLabel( Frame8, "commentLabel" );
00330     commentLabel->setText( tr( "Comment:" ) );
00331     commentLabel->setTextFormat( QLabel::RichText );
00332 
00333     Frame8Layout->addWidget( commentLabel, 3, 0 );
00334     Form1Layout->addWidget( Frame8 );
00335 
00336     hline = new QFrame( this, "hline" );
00337     hline->setFrameShadow( QFrame::Sunken );
00338     hline->setFrameStyle( QFrame::HLine | QFrame::Sunken );
00339     Form1Layout->addWidget( hline );
00340 
00341     Frame9 = new QFrame( this, "Frame9" );
00342     Frame9->setFrameShape( QFrame::NoFrame );
00343     Frame9->setFrameShadow( QFrame::Plain );
00344     Frame9Layout = new QHBoxLayout( Frame9 ); 
00345     Frame9Layout->setSpacing( 5 );
00346     Frame9Layout->setMargin( 3 );
00347 
00348     unlink = new QPushButton( Frame9, "unlink" );
00349     unlink->setFocusPolicy( QPushButton::TabFocus );
00350     unlink->setText( tr( "Delete" ) );
00351     unlink->setAutoDefault( FALSE );
00352     QWhatsThis::add(  unlink, tr( "Delete this document." ) );
00353     Frame9Layout->addWidget( unlink );
00354 
00355     duplicate = new QPushButton( Frame9, "duplicate" );
00356     duplicate->setText( tr( "Copy" ) );
00357     duplicate->setAutoDefault( FALSE );
00358     QWhatsThis::add(  duplicate, tr( "Make a copy of this document." ) );
00359     Frame9Layout->addWidget( duplicate );
00360 
00361     beam = new QPushButton( Frame9, "beam" );
00362     beam->setFocusPolicy( QPushButton::TabFocus );
00363     beam->setText( tr( "Beam" ) );
00364     beam->setAutoDefault( FALSE );
00365     QWhatsThis::add(  beam, tr( "Beam this document to another device." ) );
00366     Frame9Layout->addWidget( beam );
00367     Form1Layout->addWidget( Frame9 );
00368 
00369     // signals and slots connections
00370     connect( rotate, SIGNAL( toggled(bool) ), rotateButtons, SLOT( setEnabled(bool) ) );
00371 
00372     // tab order
00373     setTabOrder( docname, preload );
00374     setTabOrder( preload, locationCombo );
00375     setTabOrder( locationCombo, unlink );
00376     setTabOrder( unlink, duplicate );
00377     setTabOrder( duplicate, beam );
00378 }
00379 
00380 /*  
00381  *  Destroys the object and frees any allocated resources
00382  */
00383 LnkPropertiesBase::~LnkPropertiesBase()
00384 {
00385     // no need to delete child widgets, Qt does it all for us
00386 }
00387 
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:06 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001