00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "find_documentation_optionsbase.h"
00013
00014 #include <qvariant.h>
00015 #include <qheader.h>
00016 #include <qlistview.h>
00017 #include <qpushbutton.h>
00018 #include <qcheckbox.h>
00019 #include <qlabel.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023
00024
00025
00026
00027
00028
00029
00030
00031 FindDocumentationOptionsBase::FindDocumentationOptionsBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00032 : QDialog( parent, name, modal, fl )
00033 {
00034 if ( !name )
00035 setName( "FindDocumentationOptionsBase" );
00036 setSizeGripEnabled( TRUE );
00037 FindDocumentationOptionsBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "FindDocumentationOptionsBaseLayout");
00038
00039 source_list = new QListView( this, "source_list" );
00040 source_list->addColumn( QString::null );
00041
00042 FindDocumentationOptionsBaseLayout->addWidget( source_list, 1, 0 );
00043
00044 Layout9_3 = new QVBoxLayout( 0, 0, 6, "Layout9_3");
00045 Spacer5 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00046 Layout9_3->addItem( Spacer5 );
00047
00048 moveup_button = new QPushButton( this, "moveup_button" );
00049 Layout9_3->addWidget( moveup_button );
00050
00051 movedown_button = new QPushButton( this, "movedown_button" );
00052 Layout9_3->addWidget( movedown_button );
00053 Spacer6 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00054 Layout9_3->addItem( Spacer6 );
00055
00056 FindDocumentationOptionsBaseLayout->addLayout( Layout9_3, 1, 1 );
00057
00058 goto_first_match = new QCheckBox( this, "goto_first_match" );
00059
00060 FindDocumentationOptionsBaseLayout->addMultiCellWidget( goto_first_match, 2, 2, 0, 1 );
00061
00062 Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
00063 Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00064 Layout1->addItem( Horizontal_Spacing2 );
00065
00066 buttonOk = new QPushButton( this, "buttonOk" );
00067 buttonOk->setAutoDefault( TRUE );
00068 buttonOk->setDefault( TRUE );
00069 Layout1->addWidget( buttonOk );
00070
00071 buttonCancel = new QPushButton( this, "buttonCancel" );
00072 buttonCancel->setAutoDefault( TRUE );
00073 Layout1->addWidget( buttonCancel );
00074
00075 FindDocumentationOptionsBaseLayout->addMultiCellLayout( Layout1, 3, 3, 0, 1 );
00076
00077 textLabel1 = new QLabel( this, "textLabel1" );
00078
00079 FindDocumentationOptionsBaseLayout->addMultiCellWidget( textLabel1, 0, 0, 0, 1 );
00080 languageChange();
00081 resize( QSize(349, 310).expandedTo(minimumSizeHint()) );
00082 clearWState( WState_Polished );
00083
00084
00085 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00086 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00087 connect( moveup_button, SIGNAL( clicked() ), this, SLOT( sourceMoveUp() ) );
00088 connect( movedown_button, SIGNAL( clicked() ), this, SLOT( sourceMoveDown() ) );
00089 }
00090
00091
00092
00093
00094 FindDocumentationOptionsBase::~FindDocumentationOptionsBase()
00095 {
00096
00097 }
00098
00099
00100
00101
00102
00103 void FindDocumentationOptionsBase::languageChange()
00104 {
00105 setCaption( tr2i18n( "Find Documentation Options" ) );
00106 source_list->header()->setLabel( 0, QString::null );
00107 moveup_button->setText( tr2i18n( "Move &Up" ) );
00108 movedown_button->setText( tr2i18n( "Move &Down" ) );
00109 goto_first_match->setText( tr2i18n( "Go to first match" ) );
00110 buttonOk->setText( tr2i18n( "&OK" ) );
00111 buttonOk->setAccel( QKeySequence( QString::null ) );
00112 buttonCancel->setText( tr2i18n( "&Cancel" ) );
00113 buttonCancel->setAccel( QKeySequence( QString::null ) );
00114 textLabel1->setText( tr2i18n( "You can enable and disable search\n"
00115 "sources and change their priority here." ) );
00116 }
00117
00118 void FindDocumentationOptionsBase::sourceMoveUp()
00119 {
00120 qWarning( "FindDocumentationOptionsBase::sourceMoveUp(): Not implemented yet" );
00121 }
00122
00123 void FindDocumentationOptionsBase::sourceMoveDown()
00124 {
00125 qWarning( "FindDocumentationOptionsBase::sourceMoveDown(): Not implemented yet" );
00126 }
00127
00128 #include "find_documentation_optionsbase.moc"