00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "docglobalconfigwidgetbase.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qtabwidget.h>
00017 #include <qtoolbox.h>
00018 #include <qlabel.h>
00019 #include <kurlrequester.h>
00020 #include <qbuttongroup.h>
00021 #include <qcheckbox.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025
00026
00027
00028
00029
00030 DocGlobalConfigWidgetBase::DocGlobalConfigWidgetBase( QWidget* parent, const char* name, WFlags fl )
00031 : QWidget( parent, name, fl )
00032 {
00033 if ( !name )
00034 setName( "DocGlobalConfigWidgetBase" );
00035 DocGlobalConfigWidgetBaseLayout = new QGridLayout( this, 1, 1, 0, 6, "DocGlobalConfigWidgetBaseLayout");
00036
00037 docTab = new QTabWidget( this, "docTab" );
00038
00039 tab = new QWidget( docTab, "tab" );
00040 tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout");
00041
00042 collectionsBox = new QToolBox( tab, "collectionsBox" );
00043 collectionsBox->setCurrentIndex( 0 );
00044
00045 page2 = new QWidget( collectionsBox, "page2" );
00046 page2->setBackgroundMode( QWidget::PaletteBackground );
00047 collectionsBox->addItem( page2, QString::fromLatin1("") );
00048
00049 tabLayout->addWidget( collectionsBox, 0, 0 );
00050
00051 layout1 = new QVBoxLayout( 0, 0, 6, "layout1");
00052
00053 addCollectionButton = new QPushButton( tab, "addCollectionButton" );
00054 layout1->addWidget( addCollectionButton );
00055
00056 editCollectionButton = new QPushButton( tab, "editCollectionButton" );
00057 layout1->addWidget( editCollectionButton );
00058
00059 removeCollectionButton = new QPushButton( tab, "removeCollectionButton" );
00060 layout1->addWidget( removeCollectionButton );
00061 spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding );
00062 layout1->addItem( spacer1 );
00063
00064 tabLayout->addLayout( layout1, 0, 1 );
00065 docTab->insertTab( tab, QString::fromLatin1("") );
00066
00067 TabPage = new QWidget( docTab, "TabPage" );
00068 TabPageLayout = new QGridLayout( TabPage, 1, 1, 11, 6, "TabPageLayout");
00069 spacer20 = new QSpacerItem( 20, 190, QSizePolicy::Minimum, QSizePolicy::Expanding );
00070 TabPageLayout->addItem( spacer20, 1, 0 );
00071
00072 layout5 = new QGridLayout( 0, 1, 1, 0, 6, "layout5");
00073
00074 htsearchbinLabel = new QLabel( TabPage, "htsearchbinLabel" );
00075
00076 layout5->addWidget( htsearchbinLabel, 4, 0 );
00077
00078 htsearchbinEdit = new KURLRequester( TabPage, "htsearchbinEdit" );
00079 htsearchbinEdit->setFocusPolicy( KURLRequester::StrongFocus );
00080
00081 layout5->addWidget( htsearchbinEdit, 4, 1 );
00082 spacer6 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Minimum );
00083 layout5->addItem( spacer6, 1, 1 );
00084
00085 databaseDirEdit = new KURLRequester( TabPage, "databaseDirEdit" );
00086 databaseDirEdit->setFocusPolicy( KURLRequester::StrongFocus );
00087
00088 layout5->addWidget( databaseDirEdit, 0, 1 );
00089
00090 htmergebinEdit = new KURLRequester( TabPage, "htmergebinEdit" );
00091 htmergebinEdit->setFocusPolicy( KURLRequester::StrongFocus );
00092
00093 layout5->addWidget( htmergebinEdit, 3, 1 );
00094
00095 htdigbinLabel = new QLabel( TabPage, "htdigbinLabel" );
00096
00097 layout5->addWidget( htdigbinLabel, 2, 0 );
00098
00099 htdigbinEdit = new KURLRequester( TabPage, "htdigbinEdit" );
00100 htdigbinEdit->setFocusPolicy( KURLRequester::StrongFocus );
00101
00102 layout5->addWidget( htdigbinEdit, 2, 1 );
00103
00104 databaseDirLabel = new QLabel( TabPage, "databaseDirLabel" );
00105
00106 layout5->addWidget( databaseDirLabel, 0, 0 );
00107
00108 htmergebinLabel = new QLabel( TabPage, "htmergebinLabel" );
00109
00110 layout5->addWidget( htmergebinLabel, 3, 0 );
00111
00112 TabPageLayout->addLayout( layout5, 0, 0 );
00113 docTab->insertTab( TabPage, QString::fromLatin1("") );
00114
00115 TabPage_2 = new QWidget( docTab, "TabPage_2" );
00116 TabPageLayout_2 = new QGridLayout( TabPage_2, 1, 1, 11, 6, "TabPageLayout_2");
00117 spacer4 = new QSpacerItem( 20, 130, QSizePolicy::Minimum, QSizePolicy::Expanding );
00118 TabPageLayout_2->addItem( spacer4, 2, 0 );
00119
00120 buttonGroup1 = new QButtonGroup( TabPage_2, "buttonGroup1" );
00121 buttonGroup1->setColumnLayout(0, Qt::Vertical );
00122 buttonGroup1->layout()->setSpacing( 6 );
00123 buttonGroup1->layout()->setMargin( 11 );
00124 buttonGroup1Layout = new QGridLayout( buttonGroup1->layout() );
00125 buttonGroup1Layout->setAlignment( Qt::AlignTop );
00126
00127 find_box = new QCheckBox( buttonGroup1, "find_box" );
00128
00129 buttonGroup1Layout->addWidget( find_box, 0, 0 );
00130
00131 index_box = new QCheckBox( buttonGroup1, "index_box" );
00132
00133 buttonGroup1Layout->addWidget( index_box, 1, 0 );
00134
00135 search_box = new QCheckBox( buttonGroup1, "search_box" );
00136
00137 buttonGroup1Layout->addWidget( search_box, 2, 0 );
00138
00139 info_box = new QCheckBox( buttonGroup1, "info_box" );
00140
00141 buttonGroup1Layout->addWidget( info_box, 4, 0 );
00142
00143 man_box = new QCheckBox( buttonGroup1, "man_box" );
00144
00145 buttonGroup1Layout->addWidget( man_box, 3, 0 );
00146
00147 TabPageLayout_2->addWidget( buttonGroup1, 1, 0 );
00148
00149 useAssistant_box = new QCheckBox( TabPage_2, "useAssistant_box" );
00150
00151 TabPageLayout_2->addWidget( useAssistant_box, 0, 0 );
00152 docTab->insertTab( TabPage_2, QString::fromLatin1("") );
00153
00154 DocGlobalConfigWidgetBaseLayout->addWidget( docTab, 0, 0 );
00155 languageChange();
00156 resize( QSize(553, 397).expandedTo(minimumSizeHint()) );
00157 clearWState( WState_Polished );
00158
00159
00160 connect( addCollectionButton, SIGNAL( clicked() ), this, SLOT( addCollectionButtonClicked() ) );
00161 connect( editCollectionButton, SIGNAL( clicked() ), this, SLOT( editCollectionButtonClicked() ) );
00162 connect( removeCollectionButton, SIGNAL( clicked() ), this, SLOT( removeCollectionButtonClicked() ) );
00163 connect( collectionsBox, SIGNAL( currentChanged(int) ), this, SLOT( collectionsBoxCurrentChanged(int) ) );
00164
00165
00166 setTabOrder( docTab, addCollectionButton );
00167 setTabOrder( addCollectionButton, editCollectionButton );
00168 setTabOrder( editCollectionButton, removeCollectionButton );
00169 setTabOrder( removeCollectionButton, databaseDirEdit );
00170 setTabOrder( databaseDirEdit, htdigbinEdit );
00171 setTabOrder( htdigbinEdit, htmergebinEdit );
00172 setTabOrder( htmergebinEdit, htsearchbinEdit );
00173 setTabOrder( htsearchbinEdit, useAssistant_box );
00174 setTabOrder( useAssistant_box, find_box );
00175 setTabOrder( find_box, index_box );
00176 setTabOrder( index_box, search_box );
00177 setTabOrder( search_box, info_box );
00178 setTabOrder( info_box, man_box );
00179
00180
00181 htsearchbinLabel->setBuddy( htsearchbinEdit );
00182 htdigbinLabel->setBuddy( htdigbinEdit );
00183 databaseDirLabel->setBuddy( databaseDirEdit );
00184 htmergebinLabel->setBuddy( htmergebinEdit );
00185 }
00186
00187
00188
00189
00190 DocGlobalConfigWidgetBase::~DocGlobalConfigWidgetBase()
00191 {
00192
00193 }
00194
00195
00196
00197
00198
00199 void DocGlobalConfigWidgetBase::languageChange()
00200 {
00201 setCaption( tr2i18n( "Documentation" ) );
00202 collectionsBox->setItemLabel( collectionsBox->indexOf(page2), tr2i18n( "No Collections" ) );
00203 addCollectionButton->setText( tr2i18n( "&Add" ) );
00204 editCollectionButton->setText( tr2i18n( "&Edit" ) );
00205 removeCollectionButton->setText( tr2i18n( "&Remove" ) );
00206 docTab->changeTab( tab, tr2i18n( "&Documentation Collections" ) );
00207 htsearchbinLabel->setText( tr2i18n( "htse&arch executable:" ) );
00208 htdigbinLabel->setText( tr2i18n( "htdi&g executable:" ) );
00209 databaseDirLabel->setText( tr2i18n( "Database di&rectory:" ) );
00210 htmergebinLabel->setText( tr2i18n( "ht&merge executable:" ) );
00211 docTab->changeTab( TabPage, tr2i18n( "Full Text &Search" ) );
00212 buttonGroup1->setTitle( tr2i18n( "Editor Context Menu Items" ) );
00213 find_box->setText( tr2i18n( "&Find in documentation" ) );
00214 index_box->setText( tr2i18n( "&Look in documentation index" ) );
00215 search_box->setText( tr2i18n( "S&earch in documentation" ) );
00216 info_box->setText( tr2i18n( "Goto &infopage" ) );
00217 man_box->setText( tr2i18n( "Goto &manpage" ) );
00218 useAssistant_box->setText( tr2i18n( "Use KDevelop &Assistant to browse documentation" ) );
00219 docTab->changeTab( TabPage_2, tr2i18n( "O&ther" ) );
00220 }
00221
00222 void DocGlobalConfigWidgetBase::addCollectionButtonClicked()
00223 {
00224 qWarning( "DocGlobalConfigWidgetBase::addCollectionButtonClicked(): Not implemented yet" );
00225 }
00226
00227 void DocGlobalConfigWidgetBase::editCollectionButtonClicked()
00228 {
00229 qWarning( "DocGlobalConfigWidgetBase::editCollectionButtonClicked(): Not implemented yet" );
00230 }
00231
00232 void DocGlobalConfigWidgetBase::removeCollectionButtonClicked()
00233 {
00234 qWarning( "DocGlobalConfigWidgetBase::removeCollectionButtonClicked(): Not implemented yet" );
00235 }
00236
00237 void DocGlobalConfigWidgetBase::collectionsBoxCurrentChanged(int)
00238 {
00239 qWarning( "DocGlobalConfigWidgetBase::collectionsBoxCurrentChanged(int): Not implemented yet" );
00240 }
00241
00242 void DocGlobalConfigWidgetBase::updateConfig()
00243 {
00244 qWarning( "DocGlobalConfigWidgetBase::updateConfig(): Not implemented yet" );
00245 }
00246
00247 void DocGlobalConfigWidgetBase::updateIndex()
00248 {
00249 qWarning( "DocGlobalConfigWidgetBase::updateIndex(): Not implemented yet" );
00250 }
00251
00252 #include "docglobalconfigwidgetbase.moc"