From 24cf3efbfa8c9d4a324202c74794e8a22784c18c Mon Sep 17 00:00:00 2001 From: dockes Date: Sun, 7 Oct 2007 20:22:55 +0000 Subject: [PATCH] *** empty log message *** --- src/qtgui/confgui/confgui.cpp | 96 ++++++++++++------------------ src/qtgui/confgui/confguiindex.cpp | 30 +++++----- 2 files changed, 53 insertions(+), 73 deletions(-) diff --git a/src/qtgui/confgui/confgui.cpp b/src/qtgui/confgui/confgui.cpp index 221750c9..252369f2 100644 --- a/src/qtgui/confgui/confgui.cpp +++ b/src/qtgui/confgui/confgui.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: confgui.cpp,v 1.5 2007-10-01 06:35:31 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: confgui.cpp,v 1.6 2007-10-07 20:22:55 dockes Exp $ (C) 2005 J.F.Dockes"; #endif #include @@ -85,11 +85,6 @@ void ConfParamW::setValue(bool value) m_cflink->set(string(buf)); } -void ConfParamW::loadValue() -{ - -} - bool ConfParamW::createCommon(const QString& lbltxt, const QString& tltptxt) { m_hl = new QHBOXLAYOUT(this); @@ -121,15 +116,13 @@ ConfParamIntW::ConfParamIntW(QWidget *parent, ConfLink cflink, return; m_sb = new QSpinBox(this); - // sb->setMinimum(minvalue); m_sb->setMinValue(minvalue); - // sb->setMaximum(maxvalue); m_sb->setMaxValue(maxvalue); m_sb->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, - QSizePolicy::Fixed, - 0, // Horizontal stretch - 0, // Vertical stretch - m_sb->sizePolicy().hasHeightForWidth() ) ); + QSizePolicy::Fixed, + 0, // Horizontal stretch + 0, // Vertical stretch + m_sb->sizePolicy().hasHeightForWidth())); m_hl->addWidget(m_sb); QFRAME *fr = new QFRAME(this); @@ -140,7 +133,6 @@ ConfParamIntW::ConfParamIntW(QWidget *parent, ConfLink cflink, fr->sizePolicy().hasHeightForWidth() ) ); m_hl->addWidget(fr); - loadValue(); QObject::connect(m_sb, SIGNAL(valueChanged(int)), @@ -162,15 +154,14 @@ ConfParamStrW::ConfParamStrW(QWidget *parent, ConfLink cflink, if (!createCommon(lbltxt, tltptxt)) return; m_le = new QLineEdit(this); - // m_le->setMinimumSize( QSize( 200, 0 ) ); loadValue(); m_le->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, - QSizePolicy::Fixed, - 1, // Horizontal stretch - 0, // Vertical stretch - m_le->sizePolicy().hasHeightForWidth() ) ); + QSizePolicy::Fixed, + 1, // Horizontal stretch + 0, // Vertical stretch + m_le->sizePolicy().hasHeightForWidth())); m_hl->addWidget(m_le); @@ -197,17 +188,14 @@ ConfParamCStrW::ConfParamCStrW(QWidget *parent, ConfLink cflink, m_cmb = new QComboBox(this); m_cmb->insertStringList(sl); m_cmb->setEditable(false); - - loadValue(); - m_cmb->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, - QSizePolicy::Fixed, - 1, // Horizontal stretch - 0, // Vertical stretch - m_cmb->sizePolicy().hasHeightForWidth() ) ); - + QSizePolicy::Fixed, + 1, // Horizontal stretch + 0, // Vertical stretch + m_cmb->sizePolicy().hasHeightForWidth())); m_hl->addWidget(m_cmb); + loadValue(); QObject::connect(m_cmb, SIGNAL(activated(const QString&)), this, SLOT(setValue(const QString&))); } @@ -226,8 +214,8 @@ void ConfParamCStrW::loadValue() } ConfParamBoolW::ConfParamBoolW(QWidget *parent, ConfLink cflink, - const QString& lbltxt, - const QString& tltptxt) + const QString& lbltxt, + const QString& tltptxt) : ConfParamW(parent, cflink) { // No createCommon because the checkbox has a label @@ -235,12 +223,11 @@ ConfParamBoolW::ConfParamBoolW(QWidget *parent, ConfLink cflink, m_hl->setSpacing(spacing); m_cb = new QCheckBox(lbltxt, this); - m_cb->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed, 0, // Horizontal stretch 0, // Vertical stretch - m_cb->sizePolicy().hasHeightForWidth() ) ); + m_cb->sizePolicy().hasHeightForWidth())); QToolTip::add(m_cb, tltptxt); m_hl->addWidget(m_cb); @@ -249,7 +236,7 @@ ConfParamBoolW::ConfParamBoolW(QWidget *parent, ConfLink cflink, QSizePolicy::Fixed, 1, // Horizontal stretch 0, // Vertical stretch - fr->sizePolicy().hasHeightForWidth() ) ); + fr->sizePolicy().hasHeightForWidth())); m_hl->addWidget(fr); QObject::connect(m_cb, SIGNAL(toggled(bool)), @@ -276,10 +263,10 @@ ConfParamFNW::ConfParamFNW(QWidget *parent, ConfLink cflink, m_le = new QLineEdit(this); m_le->setMinimumSize(QSize(150, 0 )); m_le->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, - QSizePolicy::Fixed, - 1, // Horizontal stretch - 0, // Vertical stretch - m_le->sizePolicy().hasHeightForWidth() ) ); + QSizePolicy::Fixed, + 1, // Horizontal stretch + 0, // Vertical stretch + m_le->sizePolicy().hasHeightForWidth())); m_hl->addWidget(m_le); QPushButton *pb = new QPushButton(this); @@ -288,7 +275,7 @@ ConfParamFNW::ConfParamFNW(QWidget *parent, ConfLink cflink, QSizePolicy::Fixed, 0, // Horizontal stretch 0, // Vertical stretch - pb->sizePolicy().hasHeightForWidth() ) ); + pb->sizePolicy().hasHeightForWidth())); m_hl->addWidget(pb); @@ -313,8 +300,8 @@ void ConfParamFNW::showBrowserDialog() } ConfParamSLW::ConfParamSLW(QWidget *parent, ConfLink cflink, - const QString& lbltxt, - const QString& tltptxt) + const QString& lbltxt, + const QString& tltptxt) : ConfParamW(parent, cflink) { // Can't use createCommon here cause we want the buttons below the label @@ -329,10 +316,9 @@ ConfParamSLW::ConfParamSLW(QWidget *parent, ConfLink cflink, QSizePolicy::Fixed, 0, // Horizontal stretch 0, // Vertical stretch - tl->sizePolicy().hasHeightForWidth() ) ); + tl->sizePolicy().hasHeightForWidth())); tl->setText(lbltxt); QToolTip::add(tl, tltptxt); - /* qt4 tl->setProperty("toolTip", tltptxt);*/ vl1->addWidget(tl); QPushButton *pbA = new QPushButton(this); @@ -341,7 +327,7 @@ ConfParamSLW::ConfParamSLW(QWidget *parent, ConfLink cflink, QSizePolicy::Fixed, 0, // Horizontal stretch 0, // Vertical stretch - pbA->sizePolicy().hasHeightForWidth() ) ); + pbA->sizePolicy().hasHeightForWidth())); hl1->addWidget(pbA); QPushButton *pbD = new QPushButton(this); pbD->setText(tr("-")); @@ -349,33 +335,28 @@ ConfParamSLW::ConfParamSLW(QWidget *parent, ConfLink cflink, QSizePolicy::Fixed, 0, // Horizontal stretch 0, // Vertical stretch - pbD->sizePolicy().hasHeightForWidth() ) ); - + pbD->sizePolicy().hasHeightForWidth())); hl1->addWidget(pbD); + vl1->addLayout(hl1); m_hl->addLayout(vl1); - m_lb = new QLISTBOX(this); - - loadValue(); - m_lb->setSelectionMode(QLISTBOX::Extended); - m_lb->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, - QSizePolicy::Preferred, - 1, // Horizontal stretch - 1, // Vertical stretch - m_lb->sizePolicy().hasHeightForWidth() ) ); + QSizePolicy::Preferred, + 1, // Horizontal stretch + 1, // Vertical stretch + m_lb->sizePolicy().hasHeightForWidth())); m_hl->addWidget(m_lb); this->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, - QSizePolicy::Preferred, - 1, // Horizontal stretch - 1, // Vertical stretch - this->sizePolicy().hasHeightForWidth() ) ); + QSizePolicy::Preferred, + 1, // Horizontal stretch + 1, // Vertical stretch + this->sizePolicy().hasHeightForWidth())); - + loadValue(); QObject::connect(pbA, SIGNAL(clicked()), this, SLOT(showInputDialog())); QObject::connect(pbD, SIGNAL(clicked()), this, SLOT(deleteSelected())); } @@ -476,4 +457,3 @@ void ConfParamCSLW::showInputDialog() } } // Namespace confgui - diff --git a/src/qtgui/confgui/confguiindex.cpp b/src/qtgui/confgui/confguiindex.cpp index 39581c1e..442d2d21 100644 --- a/src/qtgui/confgui/confguiindex.cpp +++ b/src/qtgui/confgui/confguiindex.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: confguiindex.cpp,v 1.3 2007-10-01 06:35:31 dockes Exp $ (C) 2007 J.F.Dockes"; +static char rcsid[] = "@(#$Id: confguiindex.cpp,v 1.4 2007-10-07 20:22:55 dockes Exp $ (C) 2007 J.F.Dockes"; #endif #include @@ -67,7 +67,7 @@ ConfTopPanelW::ConfTopPanelW(QWidget *parent, RclConfig *config) ConfParamDNLW *etopdirs = new ConfParamDNLW(this, lnktopdirs, tr("Top directories"), tr("The list of directories where recursive " - "indexing starts. Default: your home.")); + "indexing starts.
Default: your home.")); vboxLayout->addWidget(etopdirs); ConfLink lnkskp(new ConfLinkRclRep(config, "skippedPaths")); @@ -91,14 +91,14 @@ ConfTopPanelW::ConfTopPanelW(QWidget *parent, RclConfig *config) ConfLink lnkidxsl(new ConfLinkRclRep(config, "indexstemminglanguages")); ConfParamCSLW *eidxsl = new ConfParamCSLW(this, lnkidxsl, tr("Index stemming languages"), - tr("The languages for which stemming expansion " + tr("The languages for which stemming expansion
" "dictionaries will be built."), stemlangs); vboxLayout->addWidget(eidxsl); ConfLink lnk4(new ConfLinkRclRep(config, "logfilename")); ConfParamFNW *e4 = new ConfParamFNW(this, lnk4, tr("Log file name"), - tr("The file where the messages will be written. " + tr("The file where the messages will be written.
" "Use 'stderr' for terminal output"), false); vboxLayout->addWidget(e4); @@ -106,7 +106,7 @@ ConfTopPanelW::ConfTopPanelW(QWidget *parent, RclConfig *config) ConfParamIntW *e1 = new ConfParamIntW(this, lnk1, tr("Log verbosity level"), tr("This value adjusts the amount of " - "messages, from only errors to a " + "messages,
from only errors to a " "lot of debugging data."), 0, 6); vboxLayout->addWidget(e1); @@ -124,7 +124,7 @@ ConfTopPanelW::ConfTopPanelW(QWidget *parent, RclConfig *config) ConfParamIntW(this, lnkfsocc, tr("Max disk occupation (%)"), tr("This is the percentage of disk occupation where " "indexing will fail and stop (to avoid filling up " - "your disk).
" + "your disk).
" "0 means no limit (this is the default)."), 0, 100); vboxLayout->addWidget(efsocc); @@ -161,7 +161,7 @@ ConfTopPanelW::ConfTopPanelW(QWidget *parent, RclConfig *config) ConfLink lnkusfc(new ConfLinkRclRep(config, "usesystemfilecommand")); ConfParamBoolW *eusfc = new ConfParamBoolW(this, lnkusfc, tr("Use system's 'file' command"), - tr("Use the system's 'file' command if internal " + tr("Use the system's 'file' command if internal
" "mime type identification fails.")); vboxLayout->addWidget(eusfc); } @@ -176,11 +176,10 @@ ConfSubPanelW::ConfSubPanelW(QWidget *parent, RclConfig *config) ConfLink lnksubkeydirs(new ConfLinkNullRep()); m_subdirs = new ConfParamDNLW(this, lnksubkeydirs, - QObject::tr("Subdirectories with specific parameters"), + QObject::tr("Subdirectories with specific parameters"), QObject::tr("The list of subdirectories in the indexed " - "hierarchy where some parameters need to be " - "customised. " - "Default: empty.")); + "hierarchy
where some parameters need " + "to be customised. Default: empty.")); m_subdirs->getListBox()->setSelectionMode(QLISTBOX::Single); connect(m_subdirs->getListBox(), SIGNAL(selectionChanged()), this, SLOT(subDirChanged())); @@ -199,10 +198,11 @@ ConfSubPanelW::ConfSubPanelW(QWidget *parent, RclConfig *config) QLabel *explain = new QLabel(this); explain->setText( QObject:: - tr("The following parameters are set either at the " - "top level (no selection or empty line selected) " - "or for the selected subdirectory. " - "You can add / remove directories by clicking " + tr("The parameters that follow are set either at the " + "top level, if nothing
" + "or an empty line is selected in the listbox above, " + "or for the selected subdirectory.
" + "You can add or remove directories by clicking " "the +/- buttons.")); vboxLayout->addWidget(explain);