~lubuntu-dev/juffed/trunk

« back to all changes in this revision

Viewing changes to src/app/ui/settings/SettingsDlg.cpp

  • Committer: Mezomish
  • Date: 2014-07-22 00:05:57 UTC
  • mfrom: (1054.1.3)
  • Revision ID: git-v1:5902d3e8b6037d54decec7dec15be6bb2b4f1eed
Merge pull request #66 from volkov0aa/fix-translations

Make more strings translatable and load Qt's translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <QtCore/QDir>
23
23
#include <QtCore/QStringList>
24
24
#include <QPushButton>
 
25
#include <QDialogButtonBox>
25
26
#include <QHBoxLayout>
26
27
#include <QVBoxLayout>
27
28
 
275
276
        setWindowTitle(tr("Settings"));
276
277
 
277
278
        //      create buttons
278
 
        okBtn_ = new QPushButton(tr("OK"), this);
279
 
        applyBtn_ = new QPushButton(tr("Apply"), this);
280
 
        cancelBtn_ = new QPushButton(tr("Cancel"), this);
281
 
        connect(okBtn_, SIGNAL(clicked()), SLOT(ok()));
282
 
        connect(applyBtn_, SIGNAL(clicked()), SLOT(apply()));
283
 
        connect(cancelBtn_, SIGNAL(clicked()), SLOT(reject()));
 
279
        buttonBox_ = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply);
 
280
        connect(buttonBox_, SIGNAL(accepted()), SLOT(ok()));
 
281
        connect(buttonBox_, SIGNAL(rejected()), SLOT(reject()));
 
282
        connect(buttonBox_->button(QDialogButtonBox::Apply), SIGNAL(clicked()), SLOT(apply()));
284
283
        //      create multipage
285
284
        mp_ = new MultiPage();
286
285
 
298
297
        colorsPage_->addColor(tr("Selection background color"), "editor", "selectionBgColor", EditorSettings::get(EditorSettings::SelectionBgColor));
299
298
        
300
299
        // layouts
301
 
        QHBoxLayout* btnLayout = new QHBoxLayout();
302
 
        btnLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
303
 
        btnLayout->addWidget(okBtn_);
304
 
        btnLayout->addWidget(applyBtn_);
305
 
        btnLayout->addWidget(cancelBtn_);
306
 
 
307
300
        QVBoxLayout* mainLayout = new QVBoxLayout();
308
301
        mainLayout->addWidget(mp_);
309
 
        mainLayout->addLayout(btnLayout);
 
302
        mainLayout->addWidget(buttonBox_);
310
303
        setLayout(mainLayout);
311
304
}
312
305