svnno****@sourc*****
svnno****@sourc*****
2009年 7月 20日 (月) 06:06:32 JST
Revision: 2447 http://sourceforge.jp/projects/kita/svn/view?view=rev&revision=2447 Author: nogu Date: 2009-07-20 06:06:32 +0900 (Mon, 20 Jul 2009) Log Message: ----------- refactoring Modified Paths: -------------- kita/branches/KITA-KDE4/kita/src/mainwindow.cpp kita/branches/KITA-KDE4/kita/src/prefs/CMakeLists.txt kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.cpp kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.h kita/branches/KITA-KDE4/kita/src/prefs/prefs.cpp kita/branches/KITA-KDE4/kita/src/prefs/prefs.h Added Paths: ----------- kita/branches/KITA-KDE4/kita/src/prefs/abstractprefpage.cpp kita/branches/KITA-KDE4/kita/src/prefs/abstractprefpage.h kita/branches/KITA-KDE4/kita/src/prefs/asciiartprefpage.cpp kita/branches/KITA-KDE4/kita/src/prefs/asciiartprefpage.h kita/branches/KITA-KDE4/kita/src/prefs/faceprefpage.cpp kita/branches/KITA-KDE4/kita/src/prefs/faceprefpage.h kita/branches/KITA-KDE4/kita/src/prefs/loginprefbase.ui kita/branches/KITA-KDE4/kita/src/prefs/loginprefpage.cpp kita/branches/KITA-KDE4/kita/src/prefs/loginprefpage.h kita/branches/KITA-KDE4/kita/src/prefs/uiprefpage.cpp kita/branches/KITA-KDE4/kita/src/prefs/uiprefpage.h kita/branches/KITA-KDE4/kita/src/prefs/writeprefbase.ui kita/branches/KITA-KDE4/kita/src/prefs/writeprefpage.cpp kita/branches/KITA-KDE4/kita/src/prefs/writeprefpage.h Removed Paths: ------------- kita/branches/KITA-KDE4/kita/src/prefs/login_page.ui kita/branches/KITA-KDE4/kita/src/prefs/write_page.ui Modified: kita/branches/KITA-KDE4/kita/src/mainwindow.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/mainwindow.cpp 2009-07-19 12:37:05 UTC (rev 2446) +++ kita/branches/KITA-KDE4/kita/src/mainwindow.cpp 2009-07-19 21:06:32 UTC (rev 2447) @@ -12,6 +12,7 @@ #include <QtCore/QEvent> #include <QtCore/QFile> +#include <QtGui/QBoxLayout> #include <QtGui/QKeyEvent> #include <QtGui/QSplitter> @@ -22,6 +23,7 @@ #include <kedittoolbar.h> #include <kglobal.h> #include <klineedit.h> +#include <klocale.h> #include <kmenubar.h> #include <kshortcutsdialog.h> #include <kstandarddirs.h> Modified: kita/branches/KITA-KDE4/kita/src/prefs/CMakeLists.txt =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/CMakeLists.txt 2009-07-19 12:37:05 UTC (rev 2446) +++ kita/branches/KITA-KDE4/kita/src/prefs/CMakeLists.txt 2009-07-19 21:06:32 UTC (rev 2447) @@ -4,15 +4,23 @@ ########### next target ############### -set(kitapref_LIB_SRCS aboneprefpage.cpp prefs.cpp) +set(kitapref_LIB_SRCS + abstractprefpage.cpp + asciiartprefpage.cpp + aboneprefpage.cpp + loginprefpage.cpp + faceprefpage.cpp + prefs.cpp + uiprefpage.cpp + writeprefpage.cpp) kde4_add_ui_files(kitapref_LIB_SRCS aboneprefbase.ui asciiartprefbase.ui faceprefbase.ui - login_page.ui + loginprefbase.ui uiprefbase.ui - write_page.ui) + writeprefbase.ui) kde4_add_library(kitapref SHARED ${kitapref_LIB_SRCS}) Modified: kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.cpp 2009-07-19 12:37:05 UTC (rev 2446) +++ kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.cpp 2009-07-19 21:06:32 UTC (rev 2447) @@ -12,15 +12,15 @@ #include "libkita/abone.h" -using namespace Kita::Ui; +using namespace Kita; -AbonePrefPage::AbonePrefPage(QWidget *parent) : QWidget(parent) +AbonePrefPage::AbonePrefPage(QWidget *parent) : AbstractPrefPage(parent) { setupUi(this); - idAboneText->setText(Kita::AboneConfig::aboneIDList().join("\n")); - nameAboneText->setText(Kita::AboneConfig::aboneNameList().join("\n")); - wordAboneText->setText(Kita::AboneConfig::aboneWordList().join("\n")); + idAboneText->setText(AboneConfig::aboneIDList().join("\n")); + nameAboneText->setText(AboneConfig::aboneNameList().join("\n")); + wordAboneText->setText(AboneConfig::aboneWordList().join("\n")); connect(idAboneText, SIGNAL(textChanged()), SLOT(slotTextChanged())); connect(nameAboneText, SIGNAL(textChanged()), SLOT(slotTextChanged())); @@ -29,9 +29,6 @@ m_changed = false; } -AbonePrefPage::~AbonePrefPage() -{} - void AbonePrefPage::slotTextChanged() { m_changed = true; @@ -43,18 +40,24 @@ if (m_changed) { QString idText = idAboneText->toPlainText(); QStringList idList = idText.split('\n'); - Kita::AboneConfig::setAboneIDList(idList); + AboneConfig::setAboneIDList(idList); QString nameText = nameAboneText->toPlainText(); QStringList nameList = nameText.split('\n'); - Kita::AboneConfig::setAboneNameList(nameList); + AboneConfig::setAboneNameList(nameList); QString wordText = wordAboneText->toPlainText(); QStringList wordList = wordText.split('\n'); - Kita::AboneConfig::setAboneWordList(wordList); + AboneConfig::setAboneWordList(wordList); } m_changed = false; } -#include "aboneprefpage.moc" +void AbonePrefPage::init() +{ +} + +void AbonePrefPage::reset() +{ +} Modified: kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.h 2009-07-19 12:37:05 UTC (rev 2446) +++ kita/branches/KITA-KDE4/kita/src/prefs/aboneprefpage.h 2009-07-19 21:06:32 UTC (rev 2447) @@ -10,30 +10,27 @@ #ifndef KITAABONEPREFPAGE_H #define KITAABONEPREFPAGE_H +#include "abstractprefpage.h" #include "ui_aboneprefbase.h" namespace Kita { -namespace Ui -{ /** @author Hideki Ikemoto */ - class AbonePrefPage : public QWidget, public Ui::AbonePrefBase + class AbonePrefPage : public AbstractPrefPage, public Ui::AbonePrefBase { Q_OBJECT bool m_changed; public: AbonePrefPage(QWidget *parent = 0); - ~AbonePrefPage(); - public slots: void apply(); + void init(); + void reset(); + private slots: void slotTextChanged(); - signals: - void changed(); }; } -} #endif Added: kita/branches/KITA-KDE4/kita/src/prefs/abstractprefpage.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/abstractprefpage.cpp (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/abstractprefpage.cpp 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,17 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#include "abstractprefpage.h" + +using namespace Kita; + +AbstractPrefPage::AbstractPrefPage(QWidget* parent) : QWidget(parent) +{ +} Added: kita/branches/KITA-KDE4/kita/src/prefs/abstractprefpage.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/abstractprefpage.h (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/abstractprefpage.h 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,32 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#ifndef KITAABSTRACTPREFPAGE_H +#define KITAABSTRACTPREFPAGE_H + +#include <QtGui/QWidget> + +namespace Kita +{ + class AbstractPrefPage : public QWidget + { + Q_OBJECT + public: + explicit AbstractPrefPage(QWidget* parent = 0); + virtual void apply() = 0; + virtual void init() = 0; + virtual void reset() = 0; + + signals: + void changed(); + }; +} + +#endif // KITAABSTRACTPREFPAGE_H Added: kita/branches/KITA-KDE4/kita/src/prefs/asciiartprefpage.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/asciiartprefpage.cpp (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/asciiartprefpage.cpp 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,42 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#include "asciiartprefpage.h" + +#include "libkita/asciiart.h" +#include "libkita/config_xt.h" + +using namespace Kita; + +AsciiArtPrefPage::AsciiArtPrefPage(QWidget* parent) : AbstractPrefPage(parent) +{ + setupUi(this); + init(); + + connect(asciiArtText, SIGNAL(textChanged()), SIGNAL(changed())); +} + +void AsciiArtPrefPage::apply() +{ + QString text = asciiArtText->toPlainText(); + QStringList list = text.split('\n'); + + AsciiArtConfig::setAsciiArtList(list); +} + +void AsciiArtPrefPage::init() +{ + asciiArtText->setText(AsciiArtConfig::asciiArtList().join("\n")); + asciiArtText->setFont(Config::threadFont()); +} + +void AsciiArtPrefPage::reset() +{ +} Added: kita/branches/KITA-KDE4/kita/src/prefs/asciiartprefpage.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/asciiartprefpage.h (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/asciiartprefpage.h 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,31 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#ifndef KITAASCIIARTPREFPAGE_H +#define KITAASCIIARTPREFPAGE_H + +#include "abstractprefpage.h" +#include "ui_asciiartprefbase.h" + +namespace Kita +{ + class AsciiArtPrefPage + : public AbstractPrefPage, public Ui::AsciiArtPrefBase + { + Q_OBJECT + public: + AsciiArtPrefPage(QWidget* parent = 0); + void apply(); + void init(); + void reset(); + }; +} + +#endif // KITAASCIIARTPREFPAGE_H Added: kita/branches/KITA-KDE4/kita/src/prefs/faceprefpage.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/faceprefpage.cpp (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/faceprefpage.cpp 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,155 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#include "faceprefpage.h" + +#include <kfontdialog.h> + +#include "libkita/config_xt.h" +#include "libkita/kita_misc.h" + +using namespace Kita; + +FacePrefPage::FacePrefPage(QWidget* parent) : AbstractPrefPage(parent) +{ + setupUi(this); + // font + connect(listFontButton, SIGNAL(clicked()), SLOT(slotFontButtonClicked())); + + connect(threadFontButton, SIGNAL(clicked()), + SLOT(slotThreadFontButtonClicked())); + + connect(popupFontButton, SIGNAL(clicked()), + SLOT(slotPopupFontButtonClicked())); + + updateButtons(); + + m_threadFontchanged = false; + m_threadColorChanged = false; + + // color + threadColorButton->setColor(Config::threadColor()); + threadBackgroundColorButton->setColor(Config::threadBackground()); + popupColorButton->setColor(Config::popupColor()); + popupBackgroundColorButton->setColor(Config::popupBackground()); + + connect(threadColorButton, SIGNAL(changed(const QColor&)), SIGNAL(changed())); + connect(threadBackgroundColorButton, SIGNAL(changed(const QColor&)), SIGNAL(changed())); + connect(threadColorButton, SIGNAL(changed(const QColor&)), SLOT(slotColorChanged())); + connect(threadBackgroundColorButton, SIGNAL(changed(const QColor&)), SLOT(slotColorChanged())); + connect(popupColorButton, SIGNAL(changed(const QColor&)), SIGNAL(changed())); + connect(popupBackgroundColorButton, SIGNAL(changed(const QColor&)), SIGNAL(changed())); +} + +void FacePrefPage::apply() +{ + // font + QFont font = listFontButton->font(); + Config::setFont(font); + emit fontChanged(font); + + if (m_threadFontchanged) { + QFont threadFont = threadFontButton->font(); + Config::setThreadFont(threadFont); + } + m_threadFontchanged = false; + + QFont popupFont = popupFontButton->font(); + Config::setPopupFont(popupFont); + + // color + if (m_threadColorChanged) { + Config::setThreadColor(threadColorButton->color()); + Config::setThreadBackground(threadBackgroundColorButton->color()); + } + m_threadColorChanged = false; + Config::setPopupColor(popupColorButton->color()); + Config::setPopupBackground(popupBackgroundColorButton->color()); +} + +void FacePrefPage::init() +{ +} + +void FacePrefPage::reset() +{ + // font + QFont font; + listFontButton->setText(fontToString(font)); + listFontButton->setFont(font); + + threadFontButton->setText(fontToString(font)); + threadFontButton->setFont(font); + m_threadFontchanged = true; + + popupFontButton->setText(fontToString(font)); + popupFontButton->setFont(font); + + // color + threadColorButton->setColor(Qt::black); + threadBackgroundColorButton->setColor(Qt::white); + popupColorButton->setColor(Qt::black); + popupBackgroundColorButton->setColor(Qt::yellow); + m_threadColorChanged = true; +} + +void FacePrefPage::updateButtons() +{ + QFont font = Config::font(); + listFontButton->setText(fontToString(font)); + listFontButton->setFont(font); + + QFont threadFont = Config::threadFont(); + threadFontButton->setText(fontToString(threadFont)); + threadFontButton->setFont(threadFont); + + QFont popupFont = Config::popupFont(); + popupFontButton->setText(fontToString(popupFont)); + popupFontButton->setFont(popupFont); +} + +void FacePrefPage::slotThreadFontButtonClicked() +{ + QFont threadFont = threadFontButton->font(); + + if (KFontDialog::getFont(threadFont, false, this) == QDialog::Accepted) { + threadFontButton->setText(fontToString(threadFont)); + threadFontButton->setFont(threadFont); + emit changed(); + m_threadFontchanged = true; + } +} + +void FacePrefPage::slotFontButtonClicked() +{ + QFont font = listFontButton->font(); + + if (KFontDialog::getFont(font, false, this) == QDialog::Accepted) { + listFontButton->setText(fontToString(font)); + listFontButton->setFont(font); + emit changed(); + } +} + +void FacePrefPage::slotPopupFontButtonClicked() +{ + QFont font = popupFontButton->font(); + + if (KFontDialog::getFont(font, false, this) == QDialog::Accepted) { + popupFontButton->setText(fontToString(font)); + popupFontButton->setFont(font); + emit changed(); + } +} + +void FacePrefPage::slotColorChanged() +{ + m_threadColorChanged = true; +} Added: kita/branches/KITA-KDE4/kita/src/prefs/faceprefpage.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/faceprefpage.h (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/faceprefpage.h 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,46 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#ifndef KITAFACEPREFPAGE_H +#define KITAFACEPREFPAGE_H + +#include "abstractprefpage.h" +#include "ui_faceprefbase.h" + +namespace Kita +{ + class FacePrefPage : public AbstractPrefPage, public Ui::FacePrefBase + { + Q_OBJECT + + bool m_threadFontchanged; + bool m_threadColorChanged; + + public: + FacePrefPage(QWidget* parent = 0); + void apply(); + void init(); + void reset(); + + private slots: + void slotFontButtonClicked(); + void slotPopupFontButtonClicked(); + void slotThreadFontButtonClicked(); + void slotColorChanged(); + + private: + void updateButtons(); + + signals: + void fontChanged(const QFont&); + }; +} + +#endif // KITAFACEPREFPAGE_H Deleted: kita/branches/KITA-KDE4/kita/src/prefs/login_page.ui =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/login_page.ui 2009-07-19 12:37:05 UTC (rev 2446) +++ kita/branches/KITA-KDE4/kita/src/prefs/login_page.ui 2009-07-19 21:06:32 UTC (rev 2447) @@ -1,159 +0,0 @@ -<ui version="4.0" stdsetdef="1" > - <author></author> - <comment></comment> - <exportmacro></exportmacro> - <class>Kita::LoginPrefPage</class> - <widget class="QWidget" name="Kita::LoginPrefPage" > - <property name="geometry" > - <rect> - <x>0</x> - <y>0</y> - <width>600</width> - <height>484</height> - </rect> - </property> - <property name="windowTitle" > - <string>Form1</string> - </property> - <layout class="QVBoxLayout" > - <item> - <layout class="QVBoxLayout" > - <item> - <layout class="QHBoxLayout" > - <item> - <layout class="QGridLayout" > - <item row="0" column="0" > - <widget class="QLabel" name="userIDLabel" > - <property name="text" > - <string>User ID</string> - </property> - <property name="wordWrap" > - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="1" > - <widget class="KLineEdit" name="kcfg_UserID" /> - </item> - <item row="1" column="1" > - <widget class="KLineEdit" name="kcfg_Password" > - <property name="echoMode" > - <enum>Password</enum> - </property> - </widget> - </item> - <item row="1" column="0" > - <widget class="QLabel" name="passwordLabel" > - <property name="text" > - <string>Password</string> - </property> - <property name="wordWrap" > - <bool>false</bool> - </property> - </widget> - </item> - </layout> - </item> - <item> - <spacer name="spacer6" > - <property name="sizeHint" > - <size> - <width>285</width> - <height>20</height> - </size> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - </spacer> - </item> - </layout> - </item> - <item> - <widget class="QCheckBox" name="kcfg_AutoLogin" > - <property name="text" > - <string>enables &auto login</string> - </property> - <property name="shortcut" > - <string>Alt+A</string> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout" > - <item> - <layout class="QGridLayout" > - <item row="0" column="0" > - <widget class="QLabel" name="BeMailAddressLabel" > - <property name="text" > - <string>Be mail address</string> - </property> - <property name="wordWrap" > - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="1" > - <widget class="KLineEdit" name="kcfg_BeMailAddress" /> - </item> - <item row="1" column="0" > - <widget class="QLabel" name="BeAuthCodeLabel" > - <property name="text" > - <string>Be auth code</string> - </property> - <property name="wordWrap" > - <bool>false</bool> - </property> - </widget> - </item> - <item row="1" column="1" > - <widget class="KLineEdit" name="kcfg_BeAuthCode" /> - </item> - </layout> - </item> - <item> - <spacer name="spacer7" > - <property name="sizeHint" > - <size> - <width>40</width> - <height>20</height> - </size> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </item> - <item> - <spacer name="spacer5" > - <property name="sizeHint" > - <size> - <width>20</width> - <height>325</height> - </size> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - </spacer> - </item> - </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <includes> - <include location="local" >klineedit.h</include> - </includes> -</ui> Copied: kita/branches/KITA-KDE4/kita/src/prefs/loginprefbase.ui (from rev 2446, kita/branches/KITA-KDE4/kita/src/prefs/login_page.ui) =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/loginprefbase.ui (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/loginprefbase.ui 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,159 @@ +<ui version="4.0" > + <author></author> + <comment></comment> + <exportmacro></exportmacro> + <class>Kita::LoginPrefBase</class> + <widget class="QWidget" name="Kita::LoginPrefBase" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>600</width> + <height>484</height> + </rect> + </property> + <property name="windowTitle" > + <string>Form1</string> + </property> + <layout class="QVBoxLayout" > + <item> + <layout class="QVBoxLayout" > + <item> + <layout class="QHBoxLayout" > + <item> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="userIDLabel" > + <property name="text" > + <string>User ID</string> + </property> + <property name="wordWrap" > + <bool>false</bool> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="KLineEdit" name="kcfg_UserID" /> + </item> + <item row="1" column="1" > + <widget class="KLineEdit" name="kcfg_Password" > + <property name="echoMode" > + <enum>Password</enum> + </property> + </widget> + </item> + <item row="1" column="0" > + <widget class="QLabel" name="passwordLabel" > + <property name="text" > + <string>Password</string> + </property> + <property name="wordWrap" > + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + <item> + <spacer name="spacer6" > + <property name="sizeHint" > + <size> + <width>285</width> + <height>20</height> + </size> + </property> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QCheckBox" name="kcfg_AutoLogin" > + <property name="text" > + <string>enables &auto login</string> + </property> + <property name="shortcut" > + <string>Alt+A</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" > + <item> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="BeMailAddressLabel" > + <property name="text" > + <string>Be mail address</string> + </property> + <property name="wordWrap" > + <bool>false</bool> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="KLineEdit" name="kcfg_BeMailAddress" /> + </item> + <item row="1" column="0" > + <widget class="QLabel" name="BeAuthCodeLabel" > + <property name="text" > + <string>Be auth code</string> + </property> + <property name="wordWrap" > + <bool>false</bool> + </property> + </widget> + </item> + <item row="1" column="1" > + <widget class="KLineEdit" name="kcfg_BeAuthCode" /> + </item> + </layout> + </item> + <item> + <spacer name="spacer7" > + <property name="sizeHint" > + <size> + <width>40</width> + <height>20</height> + </size> + </property> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </item> + <item> + <spacer name="spacer5" > + <property name="sizeHint" > + <size> + <width>20</width> + <height>325</height> + </size> + </property> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="orientation" > + <enum>Qt::Vertical</enum> + </property> + </spacer> + </item> + </layout> + </widget> + <layoutdefault spacing="6" margin="11" /> + <includes> + <include location="local" >klineedit.h</include> + </includes> +</ui> Property changes on: kita/branches/KITA-KDE4/kita/src/prefs/loginprefbase.ui ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:mergeinfo + Added: svn:eol-style + native Added: kita/branches/KITA-KDE4/kita/src/prefs/loginprefpage.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/loginprefpage.cpp (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/loginprefpage.cpp 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,31 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#include "loginprefpage.h" + +using namespace Kita; + +LoginPrefPage::LoginPrefPage(QWidget* parent) : AbstractPrefPage(parent) +{ + setupUi(this); + init(); +} + +void LoginPrefPage::apply() +{ +} + +void LoginPrefPage::init() +{ +} + +void LoginPrefPage::reset() +{ +} Added: kita/branches/KITA-KDE4/kita/src/prefs/loginprefpage.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/loginprefpage.h (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/loginprefpage.h 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,30 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#ifndef KITALOGINPREFPAGE_H +#define KITALOGINPREFPAGE_H + +#include "abstractprefpage.h" +#include "ui_loginprefbase.h" + +namespace Kita +{ + class LoginPrefPage : public AbstractPrefPage, public Ui::LoginPrefBase + { + Q_OBJECT + public: + LoginPrefPage(QWidget* parent = 0); + void apply(); + void init(); + void reset(); + }; +} + +#endif // KITALOGINPREFPAGE_H Modified: kita/branches/KITA-KDE4/kita/src/prefs/prefs.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/prefs.cpp 2009-07-19 12:37:05 UTC (rev 2446) +++ kita/branches/KITA-KDE4/kita/src/prefs/prefs.cpp 2009-07-19 21:06:32 UTC (rev 2447) @@ -10,15 +10,13 @@ #include "prefs.h" -#include <kfontdialog.h> -#include <ktoolinvocation.h> - #include "aboneprefpage.h" -#include "ui_login_page.h" -#include "ui_write_page.h" -#include "libkita/asciiart.h" +#include "asciiartprefpage.h" +#include "faceprefpage.h" +#include "loginprefpage.h" +#include "uiprefpage.h" +#include "writeprefpage.h" #include "libkita/config_xt.h" -#include "libkita/kita_misc.h" using namespace Kita; @@ -27,87 +25,57 @@ { enableButtonApply(false); enableButton(Help, false); + // this is the base class for your preferences dialog. it is now // a Treelist dialog.. but there are a number of other // possibilities (including Tab, Swallow, and just Plain) - - m_facePage = new Ui::FacePrefPage(0); - m_facePageItem = addPage(m_facePage, i18n("Face"), "view-list-details"); - + m_facePage = new FacePrefPage(0); + addPage(m_facePage, i18n("Face"), "view-list-details"); connect(m_facePage, SIGNAL(fontChanged(const QFont&)), SIGNAL(fontChanged(const QFont&))); - m_asciiArtPage = new Ui::AsciiArtPrefPage(0); - m_asciiArtPageItem = addPage(m_asciiArtPage, i18n("AsciiArt"), "kita"); - connect(this, SIGNAL(applyClicked()), m_asciiArtPage, SLOT(apply())); - connect(this, SIGNAL(okClicked()), m_asciiArtPage, SLOT(apply())); + m_asciiArtPage = new AsciiArtPrefPage(0); + addPage(m_asciiArtPage, i18n("AsciiArt"), "kita"); - m_uiPage = new Ui::UIPrefPage(0); - m_uiPageItem = addPage(m_uiPage, i18n("User Interface"), "configure"); + m_uiPage = new UIPrefPage(0); + addPage(m_uiPage, i18n("User Interface"), "configure"); - m_abonePage = new Ui::AbonePrefPage(0); - m_abonePageItem = addPage(m_abonePage, i18n("Abone"), "kita"); - connect(this, SIGNAL(applyClicked()), m_abonePage, SLOT(apply())); - connect(this, SIGNAL(okClicked()), m_abonePage, SLOT(apply())); + m_abonePage = new AbonePrefPage(0); + addPage(m_abonePage, i18n("Abone"), "kita"); - QWidget* m_loginWidget = new QWidget; - m_loginPage = new Ui::LoginPrefPage(); - m_loginPage->setupUi(m_loginWidget); - m_loginPageItem = addPage(m_loginWidget, i18n("Login"), "network-connect"); + m_loginPage = new LoginPrefPage(0); + addPage(m_loginPage, i18n("Login"), "network-connect"); - QWidget* m_writeWidget = new QWidget; - m_writePage = new Ui::WritePrefPage(); - m_writePage->setupUi(m_writeWidget); - m_writePageItem = addPage(m_writeWidget, i18n("Write"), "document-edit"); + m_writePage = new WritePrefPage(0); + addPage(m_writePage, i18n("Write"), "document-edit"); connect(m_facePage, SIGNAL(changed()), SLOT(slotChanged())); connect(m_asciiArtPage, SIGNAL(changed()), SLOT(slotChanged())); connect(m_uiPage, SIGNAL(changed()), SLOT(slotChanged())); connect(m_abonePage, SIGNAL(changed()), SLOT(slotChanged())); -// connect(m_loginPage, SIGNAL(changed()), SLOT(slotChanged())); // TODO -// connect(m_writePage, SIGNAL(changed()), SLOT(slotChanged())); // TODO + connect(m_loginPage, SIGNAL(changed()), SLOT(slotChanged())); + connect(m_writePage, SIGNAL(changed()), SLOT(slotChanged())); - connect(this, SIGNAL(currentPageChanged(KPageWidgetItem*, KPageWidgetItem*)), SLOT(slotCurrentPageChanged())); + connect(this, + SIGNAL(currentPageChanged(KPageWidgetItem*, KPageWidgetItem*)), + SLOT(slotCurrentPageChanged())); + connect(this, SIGNAL(applyClicked()), this, SLOT(slotApply())); + connect(this, SIGNAL(okClicked()), this, SLOT(slotOk())); } void Preferences::slotApply() { - if (currentPage() == m_facePageItem) { - // face - m_facePage->apply(); - } else if (currentPage() == m_asciiArtPageItem) { - // asciiart - m_asciiArtPage->apply(); - } else if (currentPage() == m_uiPageItem) { - // user interface - m_uiPage->apply(); - } else if (currentPage() == m_abonePageItem) { - // abone - m_abonePage->apply(); - } else { - // login - // write - } + AbstractPrefPage* page = qobject_cast<AbstractPrefPage*>(currentPage()); + if (page) + page->apply(); enableButtonApply(false); } void Preferences::slotDefault() { - if (currentPage() == m_facePageItem) { - // face - m_facePage->reset(); - } else if (currentPage() == m_asciiArtPageItem) { - // asciiart - m_asciiArtPage->reset(); - } else if (currentPage() == m_uiPageItem) { - // user - m_uiPage->reset(); - } else { - // abone - // login - // write - // debug - } + AbstractPrefPage* page = qobject_cast<AbstractPrefPage*>(currentPage()); + if (page) + page->reset(); enableButtonApply(true); } @@ -122,202 +90,15 @@ m_asciiArtPage->apply(); m_uiPage->apply(); m_abonePage->apply(); + m_loginPage->apply(); + m_writePage->apply(); -// KDialogBase::slotOk(); + accept(); } void Preferences::slotCurrentPageChanged() { - if (currentPage() == m_asciiArtPageItem) { - // ascii art - m_asciiArtPage->init(); - } + AbstractPrefPage* page = qobject_cast<AbstractPrefPage*>(currentPage()); + if (page) + page->init(); } - -Ui::AsciiArtPrefPage::AsciiArtPrefPage(QWidget* parent) - : QWidget(parent) -{ - setupUi(this); - init(); - - connect(asciiArtText, SIGNAL(textChanged()), SIGNAL(changed())); -} - -void Ui::AsciiArtPrefPage::init() -{ - asciiArtText->setText(AsciiArtConfig::asciiArtList().join("\n")); - asciiArtText->setFont(Config::threadFont()); -} - -void Ui::AsciiArtPrefPage::apply() -{ - QString text = asciiArtText->toPlainText(); - QStringList list = text.split('\n'); - - AsciiArtConfig::setAsciiArtList(list); -} - -void Ui::AsciiArtPrefPage::reset() -{ -} - -Ui::UIPrefPage::UIPrefPage(QWidget* parent) - : QWidget(parent) -{ - setupUi(this); - connect(editFileAssociation, SIGNAL(leftClickedUrl()), SLOT(slotEditFileAssociation())); -} - -void Ui::UIPrefPage::apply() -{ -} - -void Ui::UIPrefPage::reset() -{ - kcfg_AlwaysUseTab->setChecked(true); - kcfg_MarkTime->setValue(24); - kcfg_ShowMailAddress->setChecked(false); - kcfg_ShowNum->setValue(100); - //kcfg_ListSortOrder->setButton(Config::EnumListSortOrder::Mark);TODO - kcfg_PartMimeList->setText("image/gif,image/jpeg,image/png,image/x-bmp"); - kcfg_UsePart->setChecked(true); -} - -void Ui::UIPrefPage::slotEditFileAssociation() -{ - KToolInvocation::kdeinitExec("kcmshell", QStringList("filetypes")); -} - -Ui::FacePrefPage::FacePrefPage(QWidget* parent) - : QWidget(parent) -{ - setupUi(this); - // font - connect(listFontButton, SIGNAL(clicked()), SLOT(slotFontButtonClicked())); - - connect(threadFontButton, SIGNAL(clicked()), - SLOT(slotThreadFontButtonClicked())); - - connect(popupFontButton, SIGNAL(clicked()), - SLOT(slotPopupFontButtonClicked())); - - updateButtons(); - - m_threadFontchanged = false; - m_threadColorChanged = false; - - // color - threadColorButton->setColor(Config::threadColor()); - threadBackgroundColorButton->setColor(Config::threadBackground()); - popupColorButton->setColor(Config::popupColor()); - popupBackgroundColorButton->setColor(Config::popupBackground()); - - connect(threadColorButton, SIGNAL(changed(const QColor&)), SIGNAL(changed())); - connect(threadBackgroundColorButton, SIGNAL(changed(const QColor&)), SIGNAL(changed())); - connect(threadColorButton, SIGNAL(changed(const QColor&)), SLOT(slotColorChanged())); - connect(threadBackgroundColorButton, SIGNAL(changed(const QColor&)), SLOT(slotColorChanged())); - connect(popupColorButton, SIGNAL(changed(const QColor&)), SIGNAL(changed())); - connect(popupBackgroundColorButton, SIGNAL(changed(const QColor&)), SIGNAL(changed())); -} - -void Ui::FacePrefPage::apply() -{ - // font - QFont font = listFontButton->font(); - Config::setFont(font); - emit fontChanged(font); - - if (m_threadFontchanged) { - QFont threadFont = threadFontButton->font(); - Config::setThreadFont(threadFont); - } - m_threadFontchanged = false; - - QFont popupFont = popupFontButton->font(); - Config::setPopupFont(popupFont); - - // color - if (m_threadColorChanged) { - Config::setThreadColor(threadColorButton->color()); - Config::setThreadBackground(threadBackgroundColorButton->color()); - } - m_threadColorChanged = false; - Config::setPopupColor(popupColorButton->color()); - Config::setPopupBackground(popupBackgroundColorButton->color()); -} - -void Ui::FacePrefPage::reset() -{ - // font - QFont font; - listFontButton->setText(fontToString(font)); - listFontButton->setFont(font); - - threadFontButton->setText(fontToString(font)); - threadFontButton->setFont(font); - m_threadFontchanged = true; - - popupFontButton->setText(fontToString(font)); - popupFontButton->setFont(font); - - // color - threadColorButton->setColor(Qt::black); - threadBackgroundColorButton->setColor(Qt::white); - popupColorButton->setColor(Qt::black); - popupBackgroundColorButton->setColor(Qt::yellow); - m_threadColorChanged = true; -} - -void Ui::FacePrefPage::updateButtons() -{ - QFont font = Config::font(); - listFontButton->setText(fontToString(font)); - listFontButton->setFont(font); - - QFont threadFont = Config::threadFont(); - threadFontButton->setText(fontToString(threadFont)); - threadFontButton->setFont(threadFont); - - QFont popupFont = Config::popupFont(); - popupFontButton->setText(fontToString(popupFont)); - popupFontButton->setFont(popupFont); -} - -void Ui::FacePrefPage::slotThreadFontButtonClicked() -{ - QFont threadFont = threadFontButton->font(); - - if (KFontDialog::getFont(threadFont, false, this) == QDialog::Accepted) { - threadFontButton->setText(fontToString(threadFont)); - threadFontButton->setFont(threadFont); - emit changed(); - m_threadFontchanged = true; - } -} - -void Ui::FacePrefPage::slotFontButtonClicked() -{ - QFont font = listFontButton->font(); - - if (KFontDialog::getFont(font, false, this) == QDialog::Accepted) { - listFontButton->setText(fontToString(font)); - listFontButton->setFont(font); - emit changed(); - } -} - -void Ui::FacePrefPage::slotPopupFontButtonClicked() -{ - QFont font = popupFontButton->font(); - - if (KFontDialog::getFont(font, false, this) == QDialog::Accepted) { - popupFontButton->setText(fontToString(font)); - popupFontButton->setFont(font); - emit changed(); - } -} - -void Ui::FacePrefPage::slotColorChanged() -{ - m_threadColorChanged = true; -} Modified: kita/branches/KITA-KDE4/kita/src/prefs/prefs.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/prefs.h 2009-07-19 12:37:05 UTC (rev 2446) +++ kita/branches/KITA-KDE4/kita/src/prefs/prefs.h 2009-07-19 21:06:32 UTC (rev 2447) @@ -13,25 +13,15 @@ #include <kconfigdialog.h> -#include "ui_asciiartprefbase.h" -#include "ui_faceprefbase.h" -#include "ui_uiprefbase.h" - -class DebugPrefPage; - namespace Kita { - namespace Ui - { + class AbonePrefPage; + class AsciiArtPrefPage; + class FacePrefPage; + class LoginPrefPage; + class UIPrefPage; + class WritePrefPage; - class AsciiArtPrefPage; - class UIPrefPage; - class AbonePrefPage; - class LoginPrefPage; - class FacePrefPage; - class WritePrefPage; - } - class KDE_EXPORT Preferences : public KConfigDialog { Q_OBJECT @@ -39,102 +29,26 @@ public: Preferences(QWidget* parent); - protected: - virtual void slotApply(); - private: Preferences(const Preferences&); Preferences& operator=(const Preferences&); - Ui::FacePrefPage* m_facePage; - Ui::AsciiArtPrefPage* m_asciiArtPage; - Ui::UIPrefPage* m_uiPage; - Ui::AbonePrefPage* m_abonePage; - Ui::LoginPrefPage* m_loginPage; - Ui::WritePrefPage* m_writePage; - - KPageWidgetItem* m_facePageItem; - KPageWidgetItem* m_asciiArtPageItem; - KPageWidgetItem* m_uiPageItem; - KPageWidgetItem* m_abonePageItem; - KPageWidgetItem* m_loginPageItem; - KPageWidgetItem* m_writePageItem; + AbonePrefPage* m_abonePage; + AsciiArtPrefPage* m_asciiArtPage; + FacePrefPage* m_facePage; + LoginPrefPage* m_loginPage; + UIPrefPage* m_uiPage; + WritePrefPage* m_writePage; private slots: void slotChanged(); - virtual void slotOk(); - virtual void slotDefault(); + void slotApply(); + void slotOk(); + void slotDefault(); void slotCurrentPageChanged(); signals: void fontChanged(const QFont&); }; - -/*class DebugPrefPage : public DebugPrefBase -{ - Q_OBJECT - -public: - DebugPrefPage(QWidget* parent = 0); - -public slots: - void replace(); -};*/ - - class Ui::AsciiArtPrefPage : public QWidget, public Ui::AsciiArtPrefBase - { - Q_OBJECT - public: - AsciiArtPrefPage(QWidget* parent = 0); - public slots: - void init(); - void apply(); - void reset(); - - signals: - void changed(); - }; - - class Ui::UIPrefPage : public QWidget, public Ui::UIPrefBase - { - Q_OBJECT - public: - UIPrefPage(QWidget* parent = 0); - void apply(); - void reset(); - - private slots: - /// open 'file association setting dialog' - void slotEditFileAssociation(); - - signals: - void changed(); - }; - - class Ui::FacePrefPage : public QWidget, public Ui::FacePrefBase - { - Q_OBJECT - - bool m_threadFontchanged; - bool m_threadColorChanged; - - public: - FacePrefPage(QWidget* parent = 0); - void apply(); - void reset(); - - public slots: - void slotFontButtonClicked(); - void slotPopupFontButtonClicked(); - void slotThreadFontButtonClicked(); - void slotColorChanged(); - - private: - void updateButtons(); - - signals: - void fontChanged(const QFont&); - void changed(); - }; } #endif // KITAPREFS_H Added: kita/branches/KITA-KDE4/kita/src/prefs/uiprefpage.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/uiprefpage.cpp (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/uiprefpage.cpp 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,45 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#include "uiprefpage.h" + +#include <ktoolinvocation.h> + +using namespace Kita; + +UIPrefPage::UIPrefPage(QWidget* parent) : AbstractPrefPage(parent) +{ + setupUi(this); + connect(editFileAssociation, SIGNAL(leftClickedUrl()), SLOT(slotEditFileAssociation())); +} + +void UIPrefPage::apply() +{ +} + +void UIPrefPage::init() +{ +} + +void UIPrefPage::reset() +{ + kcfg_AlwaysUseTab->setChecked(true); + kcfg_MarkTime->setValue(24); + kcfg_ShowMailAddress->setChecked(false); + kcfg_ShowNum->setValue(100); + //kcfg_ListSortOrder->setButton(Config::EnumListSortOrder::Mark);TODO + kcfg_PartMimeList->setText("image/gif,image/jpeg,image/png,image/x-bmp"); + kcfg_UsePart->setChecked(true); +} + +void UIPrefPage::slotEditFileAssociation() +{ + KToolInvocation::kdeinitExec("kcmshell", QStringList("filetypes")); +} Added: kita/branches/KITA-KDE4/kita/src/prefs/uiprefpage.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/uiprefpage.h (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/uiprefpage.h 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,34 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#ifndef KITAUIPREFPAGE_H +#define KITAUIPREFPAGE_H + +#include "abstractprefpage.h" +#include "ui_uiprefbase.h" + +namespace Kita +{ + class UIPrefPage : public AbstractPrefPage, public Ui::UIPrefBase + { + Q_OBJECT + public: + UIPrefPage(QWidget* parent = 0); + void apply(); + void init(); + void reset(); + + private slots: + /// open 'file association setting dialog' + void slotEditFileAssociation(); + }; +} + +#endif // KITAUIPREFPAGE_H Deleted: kita/branches/KITA-KDE4/kita/src/prefs/write_page.ui =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/write_page.ui 2009-07-19 12:37:05 UTC (rev 2446) +++ kita/branches/KITA-KDE4/kita/src/prefs/write_page.ui 2009-07-19 21:06:32 UTC (rev 2447) @@ -1,129 +0,0 @@ -<ui version="4.0" stdsetdef="1" > - <author></author> - <comment></comment> - <exportmacro></exportmacro> - <class>Kita::WritePrefPage</class> - <widget class="QWidget" name="Kita::WritePrefPage" > - <property name="geometry" > - <rect> - <x>0</x> - <y>0</y> - <width>600</width> - <height>480</height> - </rect> - </property> - <property name="windowTitle" > - <string>Form1</string> - </property> - <layout class="QVBoxLayout" > - <item> - <layout class="QHBoxLayout" > - <item> - <widget class="QLabel" name="DefaultNameLabel" > - <property name="text" > - <string>Default Name</string> - </property> - <property name="wordWrap" > - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="KLineEdit" name="kcfg_DefaultName" /> - </item> - <item> - <widget class="QCheckBox" name="kcfg_DefaultNameUseAlways" > - <property name="text" > - <string>use always</string> - </property> - </widget> - </item> - <item> - <spacer name="spacer4" > - <property name="sizeHint" > - <size> - <width>188</width> - <height>20</height> - </size> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - </spacer> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" > - <item> - <widget class="QLabel" name="DefaultMailLabel" > - <property name="text" > - <string>Default Mail</string> - </property> - <property name="wordWrap" > - <bool>false</bool> - </property> - </widget> - </item> - <item> - <widget class="KLineEdit" name="kcfg_DefaultMail" /> - </item> - <item> - <widget class="QCheckBox" name="kcfg_DefaultSage" > - <property name="text" > - <string>sage checked</string> - </property> - </widget> - </item> - <item> - <spacer name="spacer5" > - <property name="sizeHint" > - <size> - <width>100</width> - <height>20</height> - </size> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - </spacer> - </item> - </layout> - </item> - <item> - <spacer name="spacer3" > - <property name="sizeHint" > - <size> - <width>20</width> - <height>400</height> - </size> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - </spacer> - </item> - </layout> - </widget> - <layoutdefault spacing="6" margin="11" /> - <includes> - <include location="local" >klineedit.h</include> - </includes> - <connections> - <connection> - <sender>kcfg_DefaultSage</sender> - <signal>toggled(bool)</signal> - <receiver>Kita::WritePrefPage</receiver> - <slot>DefaultSageCheckBoxToggled(bool)</slot> - </connection> - </connections> -</ui> Copied: kita/branches/KITA-KDE4/kita/src/prefs/writeprefbase.ui (from rev 2446, kita/branches/KITA-KDE4/kita/src/prefs/write_page.ui) =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/writeprefbase.ui (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/writeprefbase.ui 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,129 @@ +<ui version="4.0"> + <author></author> + <comment></comment> + <exportmacro></exportmacro> + <class>Kita::WritePrefBase</class> + <widget class="QWidget" name="Kita::WritePrefBase" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>600</width> + <height>480</height> + </rect> + </property> + <property name="windowTitle" > + <string>Form1</string> + </property> + <layout class="QVBoxLayout" > + <item> + <layout class="QHBoxLayout" > + <item> + <widget class="QLabel" name="DefaultNameLabel" > + <property name="text" > + <string>Default Name</string> + </property> + <property name="wordWrap" > + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="KLineEdit" name="kcfg_DefaultName" /> + </item> + <item> + <widget class="QCheckBox" name="kcfg_DefaultNameUseAlways" > + <property name="text" > + <string>use always</string> + </property> + </widget> + </item> + <item> + <spacer name="spacer4" > + <property name="sizeHint" > + <size> + <width>188</width> + <height>20</height> + </size> + </property> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <layout class="QHBoxLayout" > + <item> + <widget class="QLabel" name="DefaultMailLabel" > + <property name="text" > + <string>Default Mail</string> + </property> + <property name="wordWrap" > + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="KLineEdit" name="kcfg_DefaultMail" /> + </item> + <item> + <widget class="QCheckBox" name="kcfg_DefaultSage" > + <property name="text" > + <string>sage checked</string> + </property> + </widget> + </item> + <item> + <spacer name="spacer5" > + <property name="sizeHint" > + <size> + <width>100</width> + <height>20</height> + </size> + </property> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="spacer3" > + <property name="sizeHint" > + <size> + <width>20</width> + <height>400</height> + </size> + </property> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="orientation" > + <enum>Qt::Vertical</enum> + </property> + </spacer> + </item> + </layout> + </widget> + <layoutdefault spacing="6" margin="11" /> + <includes> + <include location="local" >klineedit.h</include> + </includes> + <connections> + <connection> + <sender>kcfg_DefaultSage</sender> + <signal>toggled(bool)</signal> + <receiver>Kita::WritePrefBase</receiver> + <slot>DefaultSageCheckBoxToggled(bool)</slot> + </connection> + </connections> +</ui> Property changes on: kita/branches/KITA-KDE4/kita/src/prefs/writeprefbase.ui ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:mergeinfo + Added: svn:eol-style + native Added: kita/branches/KITA-KDE4/kita/src/prefs/writeprefpage.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/writeprefpage.cpp (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/writeprefpage.cpp 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,31 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#include "writeprefpage.h" + +using namespace Kita; + +WritePrefPage::WritePrefPage(QWidget* parent) : AbstractPrefPage(parent) +{ + setupUi(this); + init(); +} + +void WritePrefPage::apply() +{ +} + +void WritePrefPage::init() +{ +} + +void WritePrefPage::reset() +{ +} Added: kita/branches/KITA-KDE4/kita/src/prefs/writeprefpage.h =================================================================== --- kita/branches/KITA-KDE4/kita/src/prefs/writeprefpage.h (rev 0) +++ kita/branches/KITA-KDE4/kita/src/prefs/writeprefpage.h 2009-07-19 21:06:32 UTC (rev 2447) @@ -0,0 +1,30 @@ +/*************************************************************************** +* Copyright (C) 2003 by Hideki Ikemoto * +* ikemo****@users***** * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ + +#ifndef KITAWRITEPREFPAGE_H +#define KITAWRITEPREFPAGE_H + +#include "abstractprefpage.h" +#include "ui_writeprefbase.h" + +namespace Kita +{ + class WritePrefPage : public AbstractPrefPage, public Ui::WritePrefBase + { + Q_OBJECT + public: + WritePrefPage(QWidget* parent = 0); + void apply(); + void init(); + void reset(); + }; +} + +#endif // KITAWRITEPREFPAGE_H