Exemplo n.º 1
0
void KBackground::defaults()
{
    m_pCBEnable->setChecked( true );
    slotEnableChanged();
    m_background->defaults();
    emit changed(true);
}
Exemplo n.º 2
0
void KBackground::load()
{
    m_pCBEnable->setChecked( config->readBoolEntry( "UseBackground", true ) );
    m_background->load(false);
    slotEnableChanged();
    emit changed(false);
}
Exemplo n.º 3
0
// BEGIN KFLConfigPage
KFLConfigPage::KFLConfigPage(QWidget *parent, const char *name, KateFileList *fl) : Kate::ConfigPage(parent, name), m_filelist(fl), m_changed(false)
{
    QVBoxLayout *lo1 = new QVBoxLayout(this);
    int spacing = KDialog::spacingHint();
    lo1->setSpacing(spacing);

    QGroupBox *gb = new QGroupBox(1, Qt::Horizontal, i18n("Background Shading"), this);
    lo1->addWidget(gb);

    QWidget *g = new QWidget(gb);
    QGridLayout *lo = new QGridLayout(g, 2, 2);
    lo->setSpacing(KDialog::spacingHint());
    cbEnableShading = new QCheckBox(i18n("&Enable background shading"), g);
    lo->addMultiCellWidget(cbEnableShading, 1, 1, 0, 1);

    kcbViewShade = new KColorButton(g);
    lViewShade = new QLabel(kcbViewShade, i18n("&Viewed documents' shade:"), g);
    lo->addWidget(lViewShade, 2, 0);
    lo->addWidget(kcbViewShade, 2, 1);

    kcbEditShade = new KColorButton(g);
    lEditShade = new QLabel(kcbEditShade, i18n("&Modified documents' shade:"), g);
    lo->addWidget(lEditShade, 3, 0);
    lo->addWidget(kcbEditShade, 3, 1);

    // sorting
    QHBox *hbSorting = new QHBox(this);
    lo1->addWidget(hbSorting);
    lSort = new QLabel(i18n("&Sort by:"), hbSorting);
    cmbSort = new QComboBox(hbSorting);
    lSort->setBuddy(cmbSort);
    QStringList l;
    l << i18n("Opening Order") << i18n("Document Name") << i18n("URL");
    cmbSort->insertStringList(l);

    lo1->insertStretch(-1, 10);

    QWhatsThis::add(cbEnableShading, i18n("When background shading is enabled, documents that have been viewed "
                                          "or edited within the current session will have a shaded background. "
                                          "The most recent documents have the strongest shade."));
    QWhatsThis::add(kcbViewShade, i18n("Set the color for shading viewed documents."));
    QWhatsThis::add(kcbEditShade, i18n("Set the color for modified documents. This color is blended into "
                                       "the color for viewed files. The most recently edited documents get "
                                       "most of this color."));

    QWhatsThis::add(cmbSort, i18n("Set the sorting method for the documents."));

    reload();

    slotEnableChanged();
    connect(cbEnableShading, SIGNAL(toggled(bool)), this, SLOT(slotMyChanged()));
    connect(cbEnableShading, SIGNAL(toggled(bool)), this, SLOT(slotEnableChanged()));
    connect(kcbViewShade, SIGNAL(changed(const QColor &)), this, SLOT(slotMyChanged()));
    connect(kcbEditShade, SIGNAL(changed(const QColor &)), this, SLOT(slotMyChanged()));
    connect(cmbSort, SIGNAL(activated(int)), this, SLOT(slotMyChanged()));
}
Exemplo n.º 4
0
void KBackground::load()
{
	m_pCBEnable->setChecked( config->group( "X-*-Greeter" ).readEntry( "UseBackground", true ) );
	m_background->load();
	slotEnableChanged();
}