Switch to unified view

a/src/qtgui/confgui/confguiindex.cpp b/src/qtgui/confgui/confguiindex.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: confguiindex.cpp,v 1.7 2007-10-18 10:15:53 dockes Exp $ (C) 2007 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: confguiindex.cpp,v 1.8 2007-10-19 14:31:40 dockes Exp $ (C) 2007 J.F.Dockes";
3
#endif
3
#endif
4
4
5
#include <qglobal.h>
5
#include <qglobal.h>
6
#if QT_VERSION < 0x040000
6
#if QT_VERSION < 0x040000
7
#define QFRAME_INCLUDE <qframe.h>
7
#define QFRAME_INCLUDE <qframe.h>
...
...
63
const static int margin = 6;
63
const static int margin = 6;
64
64
65
ConfIndexW::ConfIndexW(QWidget *parent, RclConfig *config)
65
ConfIndexW::ConfIndexW(QWidget *parent, RclConfig *config)
66
    : QTABDIALOG(parent), m_rclconf(config)
66
    : QTABDIALOG(parent), m_rclconf(config)
67
{
67
{
68
    setCaption(QString::fromLocal8Bit(config->getConfDir().c_str()));
68
    setOkButton();
69
    setOkButton();
69
    setCancelButton();
70
    setCancelButton();
70
71
71
    reloadPanels();
72
    reloadPanels();
72
73
    resize(QSize(600, 500).expandedTo(minimumSizeHint()));
73
    connect(this, SIGNAL(applyButtonPressed()), this, SLOT(acceptChanges()));
74
    connect(this, SIGNAL(applyButtonPressed()), this, SLOT(acceptChanges()));
74
    connect(this, SIGNAL(cancelButtonPressed()), this, SLOT(rejectChanges()));
75
    connect(this, SIGNAL(cancelButtonPressed()), this, SLOT(rejectChanges()));
75
}
76
}
76
77
77
void ConfIndexW::acceptChanges()
78
void ConfIndexW::acceptChanges()
...
...
134
135
135
    ConfLink lnktopdirs(new ConfLinkRclRep(config, "topdirs"));
136
    ConfLink lnktopdirs(new ConfLinkRclRep(config, "topdirs"));
136
    ConfParamDNLW *etopdirs = new 
137
    ConfParamDNLW *etopdirs = new 
137
    ConfParamDNLW(this, lnktopdirs, tr("Top directories"),
138
    ConfParamDNLW(this, lnktopdirs, tr("Top directories"),
138
              tr("The list of directories where recursive "
139
              tr("The list of directories where recursive "
139
             "indexing starts.<br>Default: your home."));
140
             "indexing starts. Default: your home."));
140
    vboxLayout->addWidget(etopdirs);
141
    vboxLayout->addWidget(etopdirs);
141
142
142
    ConfLink lnkskp(new ConfLinkRclRep(config, "skippedPaths"));
143
    ConfLink lnkskp(new ConfLinkRclRep(config, "skippedPaths"));
143
    ConfParamSLW *eskp = new 
144
    ConfParamSLW *eskp = new 
144
    ConfParamSLW(this, lnkskp, tr("List of skipped paths"),
145
    ConfParamSLW(this, lnkskp, tr("List of skipped paths"),
...
...
243
    vboxLayout->setMargin(margin);
244
    vboxLayout->setMargin(margin);
244
245
245
    ConfLink lnksubkeydirs(new ConfLinkNullRep());
246
    ConfLink lnksubkeydirs(new ConfLinkNullRep());
246
    m_subdirs = new 
247
    m_subdirs = new 
247
    ConfParamDNLW(this, lnksubkeydirs, 
248
    ConfParamDNLW(this, lnksubkeydirs, 
248
            QObject::tr("<b>Subdirectories with specific parameters"),
249
            QObject::tr("<b>Customised subtrees"),
249
              QObject::tr("The list of subdirectories in the indexed "
250
              QObject::tr("The list of subdirectories in the indexed "
250
                  "hierarchy <br>where some parameters need "
251
                  "hierarchy <br>where some parameters need "
251
                  "to be customised. Default: empty."));
252
                  "to be redefined. Default: empty."));
253
    m_subdirs->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, 
254
                    QSizePolicy::Preferred,
255
                    1,  // Horizontal stretch
256
                    1,  // Vertical stretch
257
              m_subdirs->sizePolicy().hasHeightForWidth()));
252
    m_subdirs->getListBox()->setSelectionMode(QLISTBOX::Single);
258
    m_subdirs->getListBox()->setSelectionMode(QLISTBOX::Single);
253
    connect(m_subdirs->getListBox(), SIGNAL(selectionChanged()),
259
    connect(m_subdirs->getListBox(), SIGNAL(selectionChanged()),
254
        this, SLOT(subDirChanged()));
260
        this, SLOT(subDirChanged()));
255
    connect(m_subdirs, SIGNAL(entryDeleted(QString)),
261
    connect(m_subdirs, SIGNAL(entryDeleted(QString)),
256
        this, SLOT(subDirDeleted(QString)));
262
        this, SLOT(subDirDeleted(QString)));
...
...
278
    line2->setFrameShape(QFRAME::HLine);
284
    line2->setFrameShape(QFRAME::HLine);
279
    line2->setFrameShadow(QFRAME::Sunken);
285
    line2->setFrameShadow(QFRAME::Sunken);
280
    vboxLayout->addWidget(line2);
286
    vboxLayout->addWidget(line2);
281
287
282
    m_groupbox = new QGROUPBOX(1, Qt::Horizontal, this);
288
    m_groupbox = new QGROUPBOX(1, Qt::Horizontal, this);
289
    m_groupbox->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, 
290
                    QSizePolicy::Preferred,
291
                    1,  // Horizontal stretch
292
                    3,  // Vertical stretch
293
              m_groupbox->sizePolicy().hasHeightForWidth()));
283
    ConfLink lnkskn(new ConfLinkRclRep(config, "skippedNames", &m_sk));
294
    ConfLink lnkskn(new ConfLinkRclRep(config, "skippedNames", &m_sk));
284
    ConfParamSLW *eskn = new 
295
    ConfParamSLW *eskn = new 
285
    ConfParamSLW(m_groupbox, lnkskn, 
296
    ConfParamSLW(m_groupbox, lnkskn, 
286
             QObject::tr("List of skipped names"),
297
             QObject::tr("List of skipped names"),
287
             QObject::tr("These are patterns for file or directory "
298
             QObject::tr("These are patterns for file or directory "