|
|
@ -200,7 +200,7 @@ signals:
|
|
|
|
#include <klocale.h>
|
|
|
|
#include <klocale.h>
|
|
|
|
#include <kstddirs.h>
|
|
|
|
#include <kstddirs.h>
|
|
|
|
#include <kiconloader.h>
|
|
|
|
#include <kiconloader.h>
|
|
|
|
#include <kconfig.h>
|
|
|
|
#include <tdeconfig.h>
|
|
|
|
#include <kcolorbutton.h>
|
|
|
|
#include <kcolorbutton.h>
|
|
|
|
#include <kmessagebox.h>
|
|
|
|
#include <kmessagebox.h>
|
|
|
|
|
|
|
|
|
|
|
@ -403,44 +403,44 @@ void KSettingsDlg::setPageList()
|
|
|
|
**/
|
|
|
|
**/
|
|
|
|
void KSettingsDlg::configRead()
|
|
|
|
void KSettingsDlg::configRead()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TDEConfig *kconfig = TDEGlobal::config();
|
|
|
|
TDEConfig *tdeconfig = TDEGlobal::config();
|
|
|
|
kconfig->setGroup("Settings Dialog");
|
|
|
|
tdeconfig->setGroup("Settings Dialog");
|
|
|
|
QSize *qsizeDefaultSize = new QSize(470,470);
|
|
|
|
QSize *qsizeDefaultSize = new QSize(470,470);
|
|
|
|
this->resize(kconfig->readSizeEntry("Geometry", qsizeDefaultSize));
|
|
|
|
this->resize(tdeconfig->readSizeEntry("Geometry", qsizeDefaultSize));
|
|
|
|
|
|
|
|
|
|
|
|
kconfig->setGroup("General Options");
|
|
|
|
tdeconfig->setGroup("General Options");
|
|
|
|
m_bTempStartPrompt = kconfig->readBoolEntry("StartDialog", true);
|
|
|
|
m_bTempStartPrompt = tdeconfig->readBoolEntry("StartDialog", true);
|
|
|
|
m_qradiobuttonStartPrompt->setChecked(m_bTempStartPrompt);
|
|
|
|
m_qradiobuttonStartPrompt->setChecked(m_bTempStartPrompt);
|
|
|
|
m_qradiobuttonStartFile->setChecked(!m_bTempStartPrompt);
|
|
|
|
m_qradiobuttonStartFile->setChecked(!m_bTempStartPrompt);
|
|
|
|
|
|
|
|
|
|
|
|
kconfig->setGroup("List Options");
|
|
|
|
tdeconfig->setGroup("List Options");
|
|
|
|
|
|
|
|
|
|
|
|
QFont qfontDefault = QFont("helvetica", 12);
|
|
|
|
QFont qfontDefault = QFont("helvetica", 12);
|
|
|
|
QColor qcolorDefault = Qt::white;
|
|
|
|
QColor qcolorDefault = Qt::white;
|
|
|
|
QColor qcolorDefaultBG = Qt::gray;
|
|
|
|
QColor qcolorDefaultBG = Qt::gray;
|
|
|
|
|
|
|
|
|
|
|
|
m_qcolorTempList = kconfig->readColorEntry("listColor", &qcolorDefault);
|
|
|
|
m_qcolorTempList = tdeconfig->readColorEntry("listColor", &qcolorDefault);
|
|
|
|
m_kcolorbuttonList->setColor(m_qcolorTempList);
|
|
|
|
m_kcolorbuttonList->setColor(m_qcolorTempList);
|
|
|
|
|
|
|
|
|
|
|
|
m_qcolorTempListBG = kconfig->readColorEntry("listBGColor",
|
|
|
|
m_qcolorTempListBG = tdeconfig->readColorEntry("listBGColor",
|
|
|
|
&qcolorDefaultBG);
|
|
|
|
&qcolorDefaultBG);
|
|
|
|
m_kcolorbuttonBack->setColor(m_qcolorTempListBG);
|
|
|
|
m_kcolorbuttonBack->setColor(m_qcolorTempListBG);
|
|
|
|
|
|
|
|
|
|
|
|
m_qfontTempHeader = kconfig->readFontEntry("listHeaderFont",
|
|
|
|
m_qfontTempHeader = tdeconfig->readFontEntry("listHeaderFont",
|
|
|
|
&qfontDefault);
|
|
|
|
&qfontDefault);
|
|
|
|
m_kfontchooserHeader->setFont(m_qfontTempHeader);
|
|
|
|
m_kfontchooserHeader->setFont(m_qfontTempHeader);
|
|
|
|
|
|
|
|
|
|
|
|
m_qfontTempCell = kconfig->readFontEntry("listCellFont", &qfontDefault);
|
|
|
|
m_qfontTempCell = tdeconfig->readFontEntry("listCellFont", &qfontDefault);
|
|
|
|
m_kfontchooserCell->setFont(m_qfontTempCell);
|
|
|
|
m_kfontchooserCell->setFont(m_qfontTempCell);
|
|
|
|
|
|
|
|
|
|
|
|
m_qstringTempRowCount = kconfig->readEntry("RowCount", "2");
|
|
|
|
m_qstringTempRowCount = tdeconfig->readEntry("RowCount", "2");
|
|
|
|
m_klineeditRowCount->setText(m_qstringTempRowCount);
|
|
|
|
m_klineeditRowCount->setText(m_qstringTempRowCount);
|
|
|
|
|
|
|
|
|
|
|
|
m_bTempShowGrid = kconfig->readBoolEntry("ShowGrid", true);
|
|
|
|
m_bTempShowGrid = tdeconfig->readBoolEntry("ShowGrid", true);
|
|
|
|
m_qcheckboxShowGrid->setChecked(m_bTempShowGrid);
|
|
|
|
m_qcheckboxShowGrid->setChecked(m_bTempShowGrid);
|
|
|
|
|
|
|
|
|
|
|
|
m_bTempColourPerTransaction =
|
|
|
|
m_bTempColourPerTransaction =
|
|
|
|
kconfig->readBoolEntry("ColourPerTransaction", true);
|
|
|
|
tdeconfig->readBoolEntry("ColourPerTransaction", true);
|
|
|
|
m_qradiobuttonPerTransaction->setChecked(m_bTempColourPerTransaction);
|
|
|
|
m_qradiobuttonPerTransaction->setChecked(m_bTempColourPerTransaction);
|
|
|
|
m_qradiobuttonOtherRow->setChecked(!m_bTempColourPerTransaction);
|
|
|
|
m_qradiobuttonOtherRow->setChecked(!m_bTempColourPerTransaction);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -449,25 +449,25 @@ void KSettingsDlg::configRead()
|
|
|
|
**/
|
|
|
|
**/
|
|
|
|
void KSettingsDlg::configWrite()
|
|
|
|
void KSettingsDlg::configWrite()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TDEConfig *kconfig = TDEGlobal::config();
|
|
|
|
TDEConfig *tdeconfig = TDEGlobal::config();
|
|
|
|
kconfig->setGroup("Settings Dialog");
|
|
|
|
tdeconfig->setGroup("Settings Dialog");
|
|
|
|
kconfig->writeEntry("Geometry", this->size() );
|
|
|
|
tdeconfig->writeEntry("Geometry", this->size() );
|
|
|
|
|
|
|
|
|
|
|
|
kconfig->setGroup("List Options");
|
|
|
|
tdeconfig->setGroup("List Options");
|
|
|
|
kconfig->writeEntry("listColor", m_kcolorbuttonList->color());
|
|
|
|
tdeconfig->writeEntry("listColor", m_kcolorbuttonList->color());
|
|
|
|
kconfig->writeEntry("listBGColor", m_kcolorbuttonBack->color());
|
|
|
|
tdeconfig->writeEntry("listBGColor", m_kcolorbuttonBack->color());
|
|
|
|
kconfig->writeEntry("listHeaderFont", m_kfontchooserHeader->font());
|
|
|
|
tdeconfig->writeEntry("listHeaderFont", m_kfontchooserHeader->font());
|
|
|
|
kconfig->writeEntry("listCellFont", m_kfontchooserCell->font());
|
|
|
|
tdeconfig->writeEntry("listCellFont", m_kfontchooserCell->font());
|
|
|
|
kconfig->writeEntry("RowCount", m_klineeditRowCount->text());
|
|
|
|
tdeconfig->writeEntry("RowCount", m_klineeditRowCount->text());
|
|
|
|
kconfig->writeEntry("ShowGrid", m_qcheckboxShowGrid->isChecked());
|
|
|
|
tdeconfig->writeEntry("ShowGrid", m_qcheckboxShowGrid->isChecked());
|
|
|
|
kconfig->writeEntry("ColourPerTransaction",
|
|
|
|
tdeconfig->writeEntry("ColourPerTransaction",
|
|
|
|
m_qradiobuttonPerTransaction->isChecked());
|
|
|
|
m_qradiobuttonPerTransaction->isChecked());
|
|
|
|
|
|
|
|
|
|
|
|
kconfig->setGroup("General Options");
|
|
|
|
tdeconfig->setGroup("General Options");
|
|
|
|
kconfig->writeEntry("StartDialog",
|
|
|
|
tdeconfig->writeEntry("StartDialog",
|
|
|
|
m_qradiobuttonStartPrompt->isChecked());
|
|
|
|
m_qradiobuttonStartPrompt->isChecked());
|
|
|
|
|
|
|
|
|
|
|
|
kconfig->sync();
|
|
|
|
tdeconfig->sync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** Called on OK being pressed */
|
|
|
|
/** Called on OK being pressed */
|
|
|
@ -505,20 +505,20 @@ and 3"));
|
|
|
|
void KSettingsDlg::slotCancel()
|
|
|
|
void KSettingsDlg::slotCancel()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// make sure the config object is the same as we left it
|
|
|
|
// make sure the config object is the same as we left it
|
|
|
|
TDEConfig *kconfig = TDEGlobal::config();
|
|
|
|
TDEConfig *tdeconfig = TDEGlobal::config();
|
|
|
|
kconfig->setGroup("List Options");
|
|
|
|
tdeconfig->setGroup("List Options");
|
|
|
|
kconfig->writeEntry("listColor", m_qcolorTempList);
|
|
|
|
tdeconfig->writeEntry("listColor", m_qcolorTempList);
|
|
|
|
kconfig->writeEntry("listBGColor", m_qcolorTempListBG);
|
|
|
|
tdeconfig->writeEntry("listBGColor", m_qcolorTempListBG);
|
|
|
|
kconfig->writeEntry("listHeaderFont", m_qfontTempHeader);
|
|
|
|
tdeconfig->writeEntry("listHeaderFont", m_qfontTempHeader);
|
|
|
|
kconfig->writeEntry("listCellFont", m_qfontTempCell);
|
|
|
|
tdeconfig->writeEntry("listCellFont", m_qfontTempCell);
|
|
|
|
kconfig->writeEntry("RowCount", m_qstringTempRowCount);
|
|
|
|
tdeconfig->writeEntry("RowCount", m_qstringTempRowCount);
|
|
|
|
kconfig->writeEntry("ShowGrid", m_bTempShowGrid);
|
|
|
|
tdeconfig->writeEntry("ShowGrid", m_bTempShowGrid);
|
|
|
|
kconfig->writeEntry("ColourPerTransaction", m_bTempColourPerTransaction);
|
|
|
|
tdeconfig->writeEntry("ColourPerTransaction", m_bTempColourPerTransaction);
|
|
|
|
|
|
|
|
|
|
|
|
kconfig->setGroup("General Options");
|
|
|
|
tdeconfig->setGroup("General Options");
|
|
|
|
kconfig->writeEntry("StartDialog", m_bTempStartPrompt);
|
|
|
|
tdeconfig->writeEntry("StartDialog", m_bTempStartPrompt);
|
|
|
|
|
|
|
|
|
|
|
|
kconfig->sync();
|
|
|
|
tdeconfig->sync();
|
|
|
|
|
|
|
|
|
|
|
|
if (m_bDoneApply)
|
|
|
|
if (m_bDoneApply)
|
|
|
|
accept();
|
|
|
|
accept();
|
|
|
|