summaryrefslogtreecommitdiffstats
path: root/developer-doc
diff options
context:
space:
mode:
Diffstat (limited to 'developer-doc')
-rw-r--r--developer-doc/phb/src-examples.docbook86
1 files changed, 43 insertions, 43 deletions
diff --git a/developer-doc/phb/src-examples.docbook b/developer-doc/phb/src-examples.docbook
index 84db1ac..6a999c9 100644
--- a/developer-doc/phb/src-examples.docbook
+++ b/developer-doc/phb/src-examples.docbook
@@ -200,7 +200,7 @@ signals:
#include <klocale.h>
#include <kstddirs.h>
#include <kiconloader.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
#include <kcolorbutton.h>
#include <kmessagebox.h>
@@ -403,44 +403,44 @@ void KSettingsDlg::setPageList()
**/
void KSettingsDlg::configRead()
{
- TDEConfig *kconfig = TDEGlobal::config();
- kconfig->setGroup("Settings Dialog");
+ TDEConfig *tdeconfig = TDEGlobal::config();
+ tdeconfig->setGroup("Settings Dialog");
QSize *qsizeDefaultSize = new QSize(470,470);
- this->resize(kconfig->readSizeEntry("Geometry", qsizeDefaultSize));
+ this->resize(tdeconfig->readSizeEntry("Geometry", qsizeDefaultSize));
- kconfig->setGroup("General Options");
- m_bTempStartPrompt = kconfig->readBoolEntry("StartDialog", true);
+ tdeconfig->setGroup("General Options");
+ m_bTempStartPrompt = tdeconfig->readBoolEntry("StartDialog", true);
m_qradiobuttonStartPrompt->setChecked(m_bTempStartPrompt);
m_qradiobuttonStartFile->setChecked(!m_bTempStartPrompt);
- kconfig->setGroup("List Options");
+ tdeconfig->setGroup("List Options");
QFont qfontDefault = QFont("helvetica", 12);
QColor qcolorDefault = Qt::white;
QColor qcolorDefaultBG = Qt::gray;
- m_qcolorTempList = kconfig->readColorEntry("listColor", &qcolorDefault);
+ m_qcolorTempList = tdeconfig->readColorEntry("listColor", &qcolorDefault);
m_kcolorbuttonList->setColor(m_qcolorTempList);
- m_qcolorTempListBG = kconfig->readColorEntry("listBGColor",
+ m_qcolorTempListBG = tdeconfig->readColorEntry("listBGColor",
&qcolorDefaultBG);
m_kcolorbuttonBack->setColor(m_qcolorTempListBG);
- m_qfontTempHeader = kconfig->readFontEntry("listHeaderFont",
+ m_qfontTempHeader = tdeconfig->readFontEntry("listHeaderFont",
&qfontDefault);
m_kfontchooserHeader->setFont(m_qfontTempHeader);
- m_qfontTempCell = kconfig->readFontEntry("listCellFont", &qfontDefault);
+ m_qfontTempCell = tdeconfig->readFontEntry("listCellFont", &qfontDefault);
m_kfontchooserCell->setFont(m_qfontTempCell);
- m_qstringTempRowCount = kconfig->readEntry("RowCount", "2");
+ m_qstringTempRowCount = tdeconfig->readEntry("RowCount", "2");
m_klineeditRowCount->setText(m_qstringTempRowCount);
- m_bTempShowGrid = kconfig->readBoolEntry("ShowGrid", true);
+ m_bTempShowGrid = tdeconfig->readBoolEntry("ShowGrid", true);
m_qcheckboxShowGrid->setChecked(m_bTempShowGrid);
m_bTempColourPerTransaction =
- kconfig->readBoolEntry("ColourPerTransaction", true);
+ tdeconfig->readBoolEntry("ColourPerTransaction", true);
m_qradiobuttonPerTransaction->setChecked(m_bTempColourPerTransaction);
m_qradiobuttonOtherRow->setChecked(!m_bTempColourPerTransaction);
}
@@ -449,25 +449,25 @@ void KSettingsDlg::configRead()
**/
void KSettingsDlg::configWrite()
{
- TDEConfig *kconfig = TDEGlobal::config();
- kconfig->setGroup("Settings Dialog");
- kconfig->writeEntry("Geometry", this->size() );
-
- kconfig->setGroup("List Options");
- kconfig->writeEntry("listColor", m_kcolorbuttonList->color());
- kconfig->writeEntry("listBGColor", m_kcolorbuttonBack->color());
- kconfig->writeEntry("listHeaderFont", m_kfontchooserHeader->font());
- kconfig->writeEntry("listCellFont", m_kfontchooserCell->font());
- kconfig->writeEntry("RowCount", m_klineeditRowCount->text());
- kconfig->writeEntry("ShowGrid", m_qcheckboxShowGrid->isChecked());
- kconfig->writeEntry("ColourPerTransaction",
+ TDEConfig *tdeconfig = TDEGlobal::config();
+ tdeconfig->setGroup("Settings Dialog");
+ tdeconfig->writeEntry("Geometry", this->size() );
+
+ tdeconfig->setGroup("List Options");
+ tdeconfig->writeEntry("listColor", m_kcolorbuttonList->color());
+ tdeconfig->writeEntry("listBGColor", m_kcolorbuttonBack->color());
+ tdeconfig->writeEntry("listHeaderFont", m_kfontchooserHeader->font());
+ tdeconfig->writeEntry("listCellFont", m_kfontchooserCell->font());
+ tdeconfig->writeEntry("RowCount", m_klineeditRowCount->text());
+ tdeconfig->writeEntry("ShowGrid", m_qcheckboxShowGrid->isChecked());
+ tdeconfig->writeEntry("ColourPerTransaction",
m_qradiobuttonPerTransaction->isChecked());
- kconfig->setGroup("General Options");
- kconfig->writeEntry("StartDialog",
+ tdeconfig->setGroup("General Options");
+ tdeconfig->writeEntry("StartDialog",
m_qradiobuttonStartPrompt->isChecked());
- kconfig->sync();
+ tdeconfig->sync();
}
/** Called on OK being pressed */
@@ -505,20 +505,20 @@ and 3"));
void KSettingsDlg::slotCancel()
{
// make sure the config object is the same as we left it
- TDEConfig *kconfig = TDEGlobal::config();
- kconfig->setGroup("List Options");
- kconfig->writeEntry("listColor", m_qcolorTempList);
- kconfig->writeEntry("listBGColor", m_qcolorTempListBG);
- kconfig->writeEntry("listHeaderFont", m_qfontTempHeader);
- kconfig->writeEntry("listCellFont", m_qfontTempCell);
- kconfig->writeEntry("RowCount", m_qstringTempRowCount);
- kconfig->writeEntry("ShowGrid", m_bTempShowGrid);
- kconfig->writeEntry("ColourPerTransaction", m_bTempColourPerTransaction);
-
- kconfig->setGroup("General Options");
- kconfig->writeEntry("StartDialog", m_bTempStartPrompt);
-
- kconfig->sync();
+ TDEConfig *tdeconfig = TDEGlobal::config();
+ tdeconfig->setGroup("List Options");
+ tdeconfig->writeEntry("listColor", m_qcolorTempList);
+ tdeconfig->writeEntry("listBGColor", m_qcolorTempListBG);
+ tdeconfig->writeEntry("listHeaderFont", m_qfontTempHeader);
+ tdeconfig->writeEntry("listCellFont", m_qfontTempCell);
+ tdeconfig->writeEntry("RowCount", m_qstringTempRowCount);
+ tdeconfig->writeEntry("ShowGrid", m_bTempShowGrid);
+ tdeconfig->writeEntry("ColourPerTransaction", m_bTempColourPerTransaction);
+
+ tdeconfig->setGroup("General Options");
+ tdeconfig->writeEntry("StartDialog", m_bTempStartPrompt);
+
+ tdeconfig->sync();
if (m_bDoneApply)
accept();