Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ToolbarPrefs.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'Prefs.ui'
00003 **
00004 ** Created: Tue Feb 11 23:53:35 2003
00005 **      by:  The User Interface Compiler (uic)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 #include "ToolbarPrefs.h"
00010 
00011 #include <qcheckbox.h>
00012 #include <qlabel.h>
00013 #include <qpushbutton.h>
00014 #include <qspinbox.h>
00015 #include <qlayout.h>
00016 #include <qvariant.h>
00017 #include <qtooltip.h>
00018 #include <qwhatsthis.h>
00019 #include <qcombobox.h>
00020 #include <qbuttongroup.h>
00021 #include <qlineedit.h>
00022 #ifdef USEQPE
00023 #include <qpe/menubutton.h>
00024 #endif
00025 
00026 CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir )
00027 {
00028     setCaption(tr( "Toolbar Settings" ) );
00029     QTabWidget* td = new QTabWidget(this);
00030     misc = new CMiscBarPrefs(this);
00031     filebar = new CFileBarPrefs(config, this);
00032     navbar = new CNavBarPrefs(config, this);
00033     viewbar = new CViewBarPrefs(config, this);
00034     markbar = new CMarkBarPrefs(config, this);
00035     indbar = new CIndBarPrefs(config, this);
00036     td->addTab(filebar, tr("File"));
00037     td->addTab(navbar, tr("Navigation"));
00038     td->addTab(viewbar, tr("View"));
00039     td->addTab(markbar, tr("Marks"));
00040     td->addTab(indbar, tr("Indicators"));
00041     td->addTab(misc, tr("Policy"));
00042     QVBoxLayout* v = new QVBoxLayout(this);
00043     v->addWidget(td);
00044 
00045     if (fs) showMaximized();
00046 }
00047 
00048 /*
00049 CBarPrefs1::CBarPrefs1( Config& _config, QWidget* parent,  const char* name, WFlags fl )
00050     : QWidget( parent, name, fl ), config(_config)
00051 {
00052     config.setGroup( "Toolbar" );
00053     QVBoxLayout* vb = new QVBoxLayout(this);
00054 
00055     QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "File", this);
00056     vb->addWidget(bg);
00057 
00058     open = new QCheckBox( tr("Open"), bg );
00059     open->setChecked(config.readBoolEntry( "Open", false ));
00060     connect(open, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00061     close = new QCheckBox( tr("Close"), bg );
00062     close->setChecked(config.readBoolEntry( "Close", false ));
00063     connect(close, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00064     info = new QCheckBox( tr("Info"), bg );
00065     info->setChecked(config.readBoolEntry( "Info", false ));
00066     connect(info, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00067     twotouch = new QCheckBox( tr("Two/One\nTouch"), bg );
00068     twotouch->setChecked(config.readBoolEntry( "Two/One Touch", false ));
00069     connect(twotouch, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00070     find = new QCheckBox( tr("Find"), bg );
00071     find->setChecked(config.readBoolEntry( "Find", false ));
00072     connect(find, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00073 
00074     bg = new QGroupBox(2, Qt::Horizontal, "Navigation", this);
00075     vb->addWidget(bg);
00076     scroll = new QCheckBox( tr("Scroll"), bg );
00077     scroll->setChecked(config.readBoolEntry( "Scroll", false ));
00078     connect(scroll, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00079     navigation = new QCheckBox( tr("Back/Home/Forward"), bg );
00080     navigation->setChecked(config.readBoolEntry( "Back/Home/Forward", false ));
00081     connect(navigation, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00082     page = new QCheckBox( tr("Page\nUp/Down"), bg );
00083     page->setChecked(config.readBoolEntry( "Page Up/Down", false ));
00084     connect(page, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00085     startend = new QCheckBox( tr("Goto Start/End"), bg );
00086     startend->setChecked(config.readBoolEntry( "Goto Start/End", false ));
00087     connect(startend, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00088     jump = new QCheckBox( tr("Jump"), bg );
00089     jump->setChecked(config.readBoolEntry( "Jump", false ));
00090     connect(jump, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00091     pageline = new QCheckBox( tr("Page/Line Scroll"), bg );
00092     pageline->setChecked(config.readBoolEntry( "Page/Line Scroll", false ));
00093     connect(pageline, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00094     m_isChanged = false;
00095 }
00096 
00097 void CBarPrefs1::saveall()
00098 {
00099     config.setGroup( "Toolbar" );
00100     config.writeEntry( "Open", open->isChecked());
00101     config.writeEntry( "Close", close->isChecked());
00102     config.writeEntry( "Info", info->isChecked());
00103     config.writeEntry( "Two/One Touch", twotouch->isChecked());
00104     config.writeEntry( "Find", find->isChecked());
00105     config.writeEntry( "Scroll", scroll->isChecked());
00106     config.writeEntry( "Back/Home/Forward", navigation->isChecked());
00107     config.writeEntry( "Page Up/Down", page->isChecked());
00108     config.writeEntry( "Goto Start/End", startend->isChecked());
00109     config.writeEntry( "Jump", jump->isChecked());
00110     config.writeEntry( "Page/Line Scroll", pageline->isChecked());
00111 }
00112 
00113 CBarPrefs1::~CBarPrefs1()
00114 {
00115 }
00116 */
00117 /*
00118 CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent,  const char* name, WFlags fl )
00119     : QWidget( parent, name, fl ), config(_config)
00120 {
00121     QVBoxLayout* vb = new QVBoxLayout(this);
00122 
00123     QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "View", this);
00124     vb->addWidget(bg);
00125 
00126     config.setGroup( "Toolbar" );
00127 
00128     fullscreen = new QCheckBox( tr("Fullscreen"), bg );
00129     fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false ));
00130     connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00131     rotate = new QCheckBox( tr("Rotate"), bg );
00132     rotate->setChecked(config.readBoolEntry( "Rotate", false ));
00133     connect(rotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00134 
00135     invert = new QCheckBox( tr("Invert"), bg );
00136     invert->setChecked(config.readBoolEntry( "Invert Action", false ));
00137     connect(invert, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00138 
00139     zoom = new QCheckBox( tr("Zoom"), bg );
00140     zoom->setChecked(config.readBoolEntry( "Zoom In/Out", false ));
00141     connect(zoom, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00142     setfont = new QCheckBox( tr("Set Font"), bg );
00143     setfont->setChecked(config.readBoolEntry( "Set Font", false ));
00144     connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00145 
00146     encoding = new QCheckBox( tr("Encoding"), bg );
00147     encoding->setChecked(config.readBoolEntry("Encoding Select", false));
00148     connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00149     ideogram = new QCheckBox( tr("Ideogram"), bg );
00150     ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false));
00151     connect(ideogram, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00152 
00153     bg = new QGroupBox(3, Qt::Horizontal, "Marks", this);
00154     vb->addWidget(bg);
00155     mark = new QCheckBox( tr("Bookmark"), bg );
00156     mark->setChecked(config.readBoolEntry( "Mark", false ));
00157     connect(mark, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00158     annotate = new QCheckBox( tr("Annotate"), bg );
00159     annotate->setChecked(config.readBoolEntry( "Annotate", false ));
00160     connect(annotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00161     go_to = new QCheckBox( tr("Goto"), bg );
00162     go_to->setChecked(config.readBoolEntry( "Goto", false ));
00163     connect(go_to, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00164     Delete = new QCheckBox( tr("Delete"), bg );
00165     Delete->setChecked(config.readBoolEntry( "Delete", false ));
00166     connect(Delete, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00167     autogen = new QCheckBox( tr("Autogen"), bg );
00168     autogen->setChecked(config.readBoolEntry( "Autogen", false ));
00169     connect(autogen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00170     clear = new QCheckBox( tr("Clear"), bg );
00171     clear->setChecked(config.readBoolEntry( "Clear", false ));
00172     connect(clear, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00173     save = new QCheckBox( tr("Save"), bg );
00174     save->setChecked(config.readBoolEntry( "Save", false ));
00175     connect(save, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00176     tidy = new QCheckBox( tr("Tidy"), bg );
00177     tidy->setChecked(config.readBoolEntry( "Tidy", false ));
00178     connect(tidy, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00179     block = new QCheckBox( tr("Mark/Copy"), bg );
00180     block->setChecked(config.readBoolEntry( "Start/Copy Block", false ));
00181     connect(block, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00182 
00183     bg = new QGroupBox(1, Qt::Horizontal, "Indicators", this);
00184     vb->addWidget(bg);
00185     indannotate = new QCheckBox( tr("Annotation"), bg );
00186     indannotate->setChecked(config.readBoolEntry( "Annotation indicator", false ));
00187     connect(indannotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00188     m_isChanged = false;
00189 }
00190 
00191 void CBarPrefs2::saveall()
00192 {
00193     config.setGroup( "Toolbar" );
00194     config.writeEntry( "Fullscreen", fullscreen->isChecked());
00195     config.writeEntry( "Rotate", rotate->isChecked());
00196     config.writeEntry( "Invert Action", invert->isChecked());
00197     config.writeEntry( "Zoom In/Out", zoom->isChecked());
00198     config.writeEntry( "Set Font", setfont->isChecked());
00199     config.writeEntry("Encoding Select", encoding->isChecked());
00200     config.writeEntry("Ideogram Mode", ideogram->isChecked());
00201 
00202     config.writeEntry( "Mark", mark->isChecked());
00203     config.writeEntry( "Annotate", annotate->isChecked());
00204     config.writeEntry( "Goto", go_to->isChecked());
00205     config.writeEntry( "Delete", Delete->isChecked());
00206     config.writeEntry( "Autogen", autogen->isChecked());
00207     config.writeEntry( "Clear", clear->isChecked());
00208     config.writeEntry( "Save", save->isChecked());
00209     config.writeEntry( "Tidy", tidy->isChecked());
00210     config.writeEntry( "Start/Copy Block", block->isChecked());
00211     config.writeEntry( "Annotation indicator", indannotate->isChecked());
00212 }
00213 
00214 CBarPrefs2::~CBarPrefs2()
00215 {
00216 }
00217 */
00218 
00219 CFileBarPrefs::CFileBarPrefs( Config& _config, QWidget* parent,  const char* name, WFlags fl )
00220     : QWidget( parent, name, fl ), config(_config)
00221 {
00222     config.setGroup( "Toolbar" );
00223     QVBoxLayout* vb = new QVBoxLayout(this);
00224 
00225     QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "File", this);
00226     vb->addWidget(bg);
00227 
00228     open = new QCheckBox( tr("Open"), bg );
00229     open->setChecked(config.readBoolEntry( "Open", false ));
00230     connect(open, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00231     close = new QCheckBox( tr("Close"), bg );
00232     close->setChecked(config.readBoolEntry( "Close", false ));
00233     connect(close, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00234     info = new QCheckBox( tr("Info"), bg );
00235     info->setChecked(config.readBoolEntry( "Info", false ));
00236     connect(info, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00237     twotouch = new QCheckBox( tr("Two/One\nTouch"), bg );
00238     twotouch->setChecked(config.readBoolEntry( "Two/One Touch", false ));
00239     connect(twotouch, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00240     find = new QCheckBox( tr("Find"), bg );
00241     find->setChecked(config.readBoolEntry( "Find", false ));
00242     connect(find, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00243     m_isChanged = false;
00244 }
00245 
00246 void CFileBarPrefs::saveall()
00247 {
00248     config.setGroup( "Toolbar" );
00249     config.writeEntry( "Open", open->isChecked());
00250     config.writeEntry( "Close", close->isChecked());
00251     config.writeEntry( "Info", info->isChecked());
00252     config.writeEntry( "Two/One Touch", twotouch->isChecked());
00253     config.writeEntry( "Find", find->isChecked());
00254 }
00255 
00256 CFileBarPrefs::~CFileBarPrefs()
00257 {
00258 }
00259 
00260 CNavBarPrefs::CNavBarPrefs( Config& _config, QWidget* parent,  const char* name, WFlags fl )
00261     : QWidget( parent, name, fl ), config(_config)
00262 {
00263     config.setGroup( "Toolbar" );
00264     QVBoxLayout* vb = new QVBoxLayout(this);
00265 
00266     QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "Navigation", this);
00267     vb->addWidget(bg);
00268     scroll = new QCheckBox( tr("Scroll"), bg );
00269     scroll->setChecked(config.readBoolEntry( "Scroll", false ));
00270     connect(scroll, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00271 
00272     navback = new QCheckBox( tr("Back"), bg );
00273     navback->setChecked(config.readBoolEntry( "Back", false ));
00274     connect(navback, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00275     navhome = new QCheckBox( tr("Home"), bg );
00276     navhome->setChecked(config.readBoolEntry( "Home", false ));
00277     connect(navhome, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00278     navforward = new QCheckBox( tr("Forward"), bg );
00279     navforward->setChecked(config.readBoolEntry( "Forward", false ));
00280     connect(navforward, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00281 
00282     pageup = new QCheckBox( tr("Page Up"), bg );
00283     pageup->setChecked(config.readBoolEntry( "Page Up", false ));
00284     connect(pageup, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00285     pagedown = new QCheckBox( tr("Page Down"), bg );
00286     pagedown->setChecked(config.readBoolEntry( "Page Down", false ));
00287     connect(pagedown, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00288     gotostart = new QCheckBox( tr("Goto Start"), bg );
00289     gotostart->setChecked(config.readBoolEntry( "Goto Start", false ));
00290     connect(gotostart, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00291     gotoend = new QCheckBox( tr("Goto End"), bg );
00292     gotoend->setChecked(config.readBoolEntry( "Goto End", false ));
00293     connect(gotoend, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00294     jump = new QCheckBox( tr("Jump"), bg );
00295     jump->setChecked(config.readBoolEntry( "Jump", false ));
00296     connect(jump, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00297     pageline = new QCheckBox( tr("Page/Line Scroll"), bg );
00298     pageline->setChecked(config.readBoolEntry( "Page/Line Scroll", false ));
00299     connect(pageline, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00300     m_isChanged = false;
00301 }
00302 
00303 void CNavBarPrefs::saveall()
00304 {
00305     config.setGroup( "Toolbar" );
00306     config.writeEntry( "Scroll", scroll->isChecked());
00307     config.writeEntry( "Back", navback->isChecked());
00308     config.writeEntry( "Home", navhome->isChecked());
00309     config.writeEntry( "Forward", navforward->isChecked());
00310     config.writeEntry( "Page Up", pageup->isChecked());
00311     config.writeEntry( "Page Down", pagedown->isChecked());
00312     config.writeEntry( "Goto Start", gotostart->isChecked());
00313     config.writeEntry( "Goto End", gotoend->isChecked());
00314     config.writeEntry( "Jump", jump->isChecked());
00315     config.writeEntry( "Page/Line Scroll", pageline->isChecked());
00316 }
00317 
00318 CNavBarPrefs::~CNavBarPrefs()
00319 {
00320 }
00321 
00322 CViewBarPrefs::CViewBarPrefs( Config& _config, QWidget* parent,  const char* name, WFlags fl )
00323     : QWidget( parent, name, fl ), config(_config)
00324 {
00325     QVBoxLayout* vb = new QVBoxLayout(this);
00326 
00327     QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "View", this);
00328     vb->addWidget(bg);
00329 
00330     config.setGroup( "Toolbar" );
00331 
00332     fullscreen = new QCheckBox( tr("Fullscreen"), bg );
00333     fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false ));
00334     connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00335     rotate = new QCheckBox( tr("Rotate"), bg );
00336     rotate->setChecked(config.readBoolEntry( "Rotate", false ));
00337     connect(rotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00338 
00339     invert = new QCheckBox( tr("Invert"), bg );
00340     invert->setChecked(config.readBoolEntry( "Invert Action", false ));
00341     connect(invert, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00342 
00343     zoomin = new QCheckBox( tr("Zoom In"), bg );
00344     zoomin->setChecked(config.readBoolEntry( "Zoom In", false ));
00345     connect(zoomin, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00346     zoomout = new QCheckBox( tr("Zoom Out"), bg );
00347     zoomout->setChecked(config.readBoolEntry( "Zoom Out", false ));
00348     connect(zoomout, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00349     setfont = new QCheckBox( tr("Set Font"), bg );
00350     setfont->setChecked(config.readBoolEntry( "Set Font", false ));
00351     connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00352 
00353     encoding = new QCheckBox( tr("Encoding"), bg );
00354     encoding->setChecked(config.readBoolEntry("Encoding Select", false));
00355     connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00356     ideogram = new QCheckBox( tr("Ideogram"), bg );
00357     ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false));
00358     connect(ideogram, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00359     m_isChanged = false;
00360 }
00361 
00362 void CViewBarPrefs::saveall()
00363 {
00364     config.setGroup( "Toolbar" );
00365     config.writeEntry( "Fullscreen", fullscreen->isChecked());
00366     config.writeEntry( "Rotate", rotate->isChecked());
00367     config.writeEntry( "Invert Action", invert->isChecked());
00368     config.writeEntry( "Zoom In", zoomin->isChecked());
00369     config.writeEntry( "Zoom Out", zoomout->isChecked());
00370     config.writeEntry( "Set Font", setfont->isChecked());
00371     config.writeEntry("Encoding Select", encoding->isChecked());
00372     config.writeEntry("Ideogram Mode", ideogram->isChecked());
00373 }
00374 
00375 CViewBarPrefs::~CViewBarPrefs()
00376 {
00377 }
00378 
00379 CMarkBarPrefs::CMarkBarPrefs( Config& _config, QWidget* parent,  const char* name, WFlags fl )
00380     : QWidget( parent, name, fl ), config(_config)
00381 {
00382     QVBoxLayout* vb = new QVBoxLayout(this);
00383 
00384     QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "Marks", this);
00385     vb->addWidget(bg);
00386     mark = new QCheckBox( tr("Bookmark"), bg );
00387     mark->setChecked(config.readBoolEntry( "Mark", false ));
00388     connect(mark, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00389     annotate = new QCheckBox( tr("Annotate"), bg );
00390     annotate->setChecked(config.readBoolEntry( "Annotate", false ));
00391     connect(annotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00392     go_to = new QCheckBox( tr("Goto"), bg );
00393     go_to->setChecked(config.readBoolEntry( "Goto", false ));
00394     connect(go_to, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00395     Delete = new QCheckBox( tr("Delete"), bg );
00396     Delete->setChecked(config.readBoolEntry( "Delete", false ));
00397     connect(Delete, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00398     autogen = new QCheckBox( tr("Autogen"), bg );
00399     autogen->setChecked(config.readBoolEntry( "Autogen", false ));
00400     connect(autogen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00401     clear = new QCheckBox( tr("Clear"), bg );
00402     clear->setChecked(config.readBoolEntry( "Clear", false ));
00403     connect(clear, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00404     save = new QCheckBox( tr("Save"), bg );
00405     save->setChecked(config.readBoolEntry( "Save", false ));
00406     connect(save, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00407     tidy = new QCheckBox( tr("Tidy"), bg );
00408     tidy->setChecked(config.readBoolEntry( "Tidy", false ));
00409     connect(tidy, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00410     startblock = new QCheckBox( tr("Mark Block"), bg );
00411     startblock->setChecked(config.readBoolEntry( "Start Block", false ));
00412     connect(startblock, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00413     copyblock = new QCheckBox( tr("Copy Block"), bg );
00414     copyblock->setChecked(config.readBoolEntry( "Copy Block", false ));
00415     connect(copyblock, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00416     m_isChanged = false;
00417 }
00418 
00419 void CMarkBarPrefs::saveall()
00420 {
00421     config.setGroup( "Toolbar" );
00422     config.writeEntry( "Mark", mark->isChecked());
00423     config.writeEntry( "Annotate", annotate->isChecked());
00424     config.writeEntry( "Goto", go_to->isChecked());
00425     config.writeEntry( "Delete", Delete->isChecked());
00426     config.writeEntry( "Autogen", autogen->isChecked());
00427     config.writeEntry( "Clear", clear->isChecked());
00428     config.writeEntry( "Save", save->isChecked());
00429     config.writeEntry( "Tidy", tidy->isChecked());
00430     config.writeEntry( "Start Block", startblock->isChecked());
00431     config.writeEntry( "Copy Block", copyblock->isChecked());
00432 }
00433 
00434 CMarkBarPrefs::~CMarkBarPrefs()
00435 {
00436 }
00437 
00438 CMiscBarPrefs::CMiscBarPrefs( QWidget* parent,  const char* name, WFlags fl )
00439     : QWidget( parent, name, fl )
00440 {
00441 
00442     QGridLayout* hl = new QGridLayout(this,2,2);
00443 
00444     hl->setMargin( 0 );
00445 
00446     QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Dialogs", this);
00447     floating = new QCheckBox(gb);
00448     floating->setText(tr("Floating"));
00449     hl->addWidget( gb, 0, 0 );
00450 
00451 
00452     gb = new QGroupBox(1, Qt::Horizontal, "Bars (Restart)", this);
00453 
00454 //    QLabel* ql = new QLabel("Restart to apply changes", gb);
00455 //    TextLabel = new QLabel( gb );
00456 //    TextLabel->setText( tr( "Policy" ) );
00457 
00458 #ifdef USECOMBO
00459     tbpolicy = new QComboBox(gb);
00460 #else
00461     tbpolicy = new MenuButton(gb);
00462 #endif
00463     tbpolicy->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
00464 #ifdef USEQPE
00465     tbpolicy->insertItem(tr("Single bar"));
00466     tbpolicy->insertItem(tr("Menu/tool bar"));
00467     tbpolicy->insertItem(tr("Multiple bars"));
00468 #else
00469     tbpolicy->insertItem(tr("Single bar"));
00470     tbpolicy->insertItem(tr("Multiple bars"));
00471 #endif
00472 
00473 #ifdef USECOMBO
00474     tbposition = new QComboBox(gb);
00475 #else
00476     tbposition = new MenuButton(gb);
00477 #endif
00478     tbposition->insertItem(tr("Top"));
00479     tbposition->insertItem(tr("Bottom"));
00480     tbposition->insertItem(tr("Right"));
00481     tbposition->insertItem(tr("Left"));
00482     tbposition->insertItem(tr("Minimised"));
00483 
00484     tbmovable = new QCheckBox( tr("Movable"), gb );
00485 
00486     hl->addWidget(gb, 0, 1);
00487 
00488     gb = new QGroupBox(1, Qt::Horizontal, "QT Scroll Bar", this);
00489 
00490 #ifdef USECOMBO
00491     qtscroll = new QComboBox(gb);
00492 #else
00493     qtscroll = new MenuButton(gb);
00494 #endif
00495     qtscroll->insertItem(tr("None"));
00496     qtscroll->insertItem(tr("Right"));
00497     qtscroll->insertItem(tr("Left"));
00498 
00499     hl->addWidget(gb, 1, 0);
00500     gb = new QGroupBox(1, Qt::Horizontal, "Miniscroll", this);
00501 
00502 #ifdef USECOMBO
00503     localscroll = new QComboBox(gb);
00504 #else
00505     localscroll = new MenuButton(gb);
00506 #endif
00507     localscroll->insertItem(tr("None"));
00508     localscroll->insertItem(tr("Bottom"));
00509     localscroll->insertItem(tr("Right"));
00510     localscroll->insertItem(tr("Left"));
00511 
00512     //scrollonleft = new QCheckBox( tr("... on Left"), gb );
00513     //  ch->setChecked(config.readBoolEntry( "Movable", false ));
00514 
00515     hl->addWidget(gb, 1, 1);
00516 
00517 }
00518 
00519 CMiscBarPrefs::~CMiscBarPrefs()
00520 {
00521     // no need to delete child widgets, Qt does it all for us
00522 }
00523 
00524 
00525 CIndBarPrefs::CIndBarPrefs( Config& _config, QWidget* parent,  const char* name, WFlags fl )
00526     : QWidget( parent, name, fl ), config(_config)
00527 {
00528     QVBoxLayout* vb = new QVBoxLayout(this);
00529 
00530     QGroupBox* bg = new QGroupBox(1, Qt::Horizontal, "Indicators", this);
00531     vb->addWidget(bg);
00532     indannotate = new QCheckBox( tr("Annotation"), bg );
00533     indannotate->setChecked(config.readBoolEntry( "Annotation indicator", false ));
00534     connect(indannotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
00535     m_isChanged = false;
00536 }
00537 
00538 void CIndBarPrefs::saveall()
00539 {
00540     config.setGroup( "Toolbar" );
00541     config.writeEntry( "Annotation indicator", indannotate->isChecked());
00542 }
00543 
00544 CIndBarPrefs::~CIndBarPrefs()
00545 {
00546 }

Generated on Sat Nov 5 16:16:59 2005 for OPIE by  doxygen 1.4.2