</property>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>layout9</cstring>
</property>
- <grid>
+ <hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>fontLabel</cstring>
- </property>
- <property name="text">
- <string>set list font</string>
+ <cstring>layout6</cstring>
</property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>fontLabel</cstring>
+ </property>
+ <property name="text">
+ <string>set list font</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>threadFontLabel</cstring>
+ </property>
+ <property name="text">
+ <string>set thread font</string>
+ </property>
+ </widget>
+ </vbox>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>threadFontLabel</cstring>
- </property>
- <property name="text">
- <string>set thread font</string>
+ <cstring>layout5</cstring>
</property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>fontButton</cstring>
+ </property>
+ <property name="text">
+ <string>set font</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>threadFontButton</cstring>
+ </property>
+ <property name="text">
+ <string>set font</string>
+ </property>
+ </widget>
+ </vbox>
</widget>
- <widget class="KFontRequester" row="0" column="1">
+ <spacer>
<property name="name">
- <cstring>FontRequester</cstring>
- </property>
- <property name="title">
- <string>list</string>
+ <cstring>spacer2</cstring>
</property>
- <property name="sampleText">
- <string></string>
+ <property name="orientation">
+ <enum>Horizontal</enum>
</property>
- </widget>
- <widget class="KFontRequester" row="1" column="1">
- <property name="name">
- <cstring>ThreadFontRequester</cstring>
+ <property name="sizeType">
+ <enum>Expanding</enum>
</property>
- <property name="title">
- <string>thread</string>
+ <property name="sizeHint">
+ <size>
+ <width>424</width>
+ <height>20</height>
+ </size>
</property>
- </widget>
- </grid>
+ </spacer>
+ </hbox>
</widget>
<spacer>
<property name="name">
</spacer>
</vbox>
</widget>
-<customwidgets>
-</customwidgets>
-<connections>
- <connection>
- <sender>ThreadFontRequester</sender>
- <signal>fontSelected(const QFont&)</signal>
- <receiver>KitaFontPrefBase</receiver>
- <slot>ThreadFontSelected(const QFont&)</slot>
- </connection>
- <connection>
- <sender>FontRequester</sender>
- <signal>fontSelected(const QFont&)</signal>
- <receiver>KitaFontPrefBase</receiver>
- <slot>FontSelected(const QFont&)</slot>
- </connection>
-</connections>
-<slots>
- <slot>ThreadFontSelected(const QFont&)</slot>
- <slot>FontSelected(const QFont&)</slot>
-</slots>
<layoutdefaults spacing="6" margin="11"/>
-<includehints>
- <includehint>kfontrequester.h</includehint>
- <includehint>kfontrequester.h</includehint>
-</includehints>
</UI>
#include <kpushbutton.h>
#include <ktextedit.h>
#include <kcolorbutton.h>
-#include <kfontrequester.h>
#include <qlayout.h>
-#include <qvbox.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlistbox.h>
// 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)
- QVBox * fontFrame = addVBoxPage( i18n( "Font" ), i18n( "Font" ) );
+ QFrame * fontFrame = addPage( i18n( "Font" ), i18n( "Font" ) );
m_fontPage = new KitaFontPrefPage( fontFrame );
connect( m_fontPage, SIGNAL( fontChanged( const QFont& ) ),
connect( m_fontPage, SIGNAL( threadFontChanged( const QFont& ) ),
SIGNAL( threadFontChanged( const QFont& ) ) );
- QVBox * colorFrame = addVBoxPage( i18n( "Color" ), i18n( "Color" ) );
+ QFrame * colorFrame = addPage( i18n( "Color" ), i18n( "Color" ) );
m_colorPage = new KitaColorPrefPage( colorFrame );
- QVBox * asciiArtFrame = addVBoxPage( i18n( "AsciiArt" ), i18n( "AsciiArt" ) );
+ QFrame * asciiArtFrame = addPage( i18n( "AsciiArt" ), i18n( "AsciiArt" ) );
m_asciiArtPage = new Kita::AsciiArtPrefPage( asciiArtFrame );
- QVBox * uiFrame = addVBoxPage( i18n( "User Interface" ), i18n( "User Interface" ) );
+ QFrame * uiFrame = addPage( i18n( "User Interface" ), i18n( "User Interface" ) );
m_uiPage = new Kita::UIPrefPage( uiFrame );
- QVBox * aboneFrame = addVBoxPage( i18n( "Abone" ), i18n( "Abone" ) );
+ QFrame * aboneFrame = addPage( i18n( "Abone" ), i18n( "Abone" ) );
m_abonePage = new Kita::AbonePrefPage( aboneFrame );
- QVBox * debugFrame = addVBoxPage( i18n( "Debug" ), i18n( "Debug" ) );
+ QFrame * debugFrame = addPage( i18n( "Debug" ), i18n( "Debug" ) );
m_debugPage = new DebugPrefPage( debugFrame );
connect( m_fontPage, SIGNAL( changed() ), SLOT( slotChanged() ) );
KitaFontPrefPage::KitaFontPrefPage( QWidget* parent )
: KitaFontPrefBase( parent )
{
- FontRequester->setFont( KitaConfig::font() );
- ThreadFontRequester->setFont( KitaConfig::threadFont() );
+ connect( fontButton, SIGNAL( clicked() ), SLOT( slotFontButtonClicked() ) );
+
+ connect( threadFontButton, SIGNAL( clicked() ),
+ SLOT( slotThreadFontButtonClicked() ) );
+
+ updateButtons();
}
void KitaFontPrefPage::apply()
{
- QFont font = FontRequester->font();
+ QFont font = fontButton->font();
KitaConfig::setFont( font );
emit fontChanged( font );
- QFont threadFont = ThreadFontRequester->font();
+ QFont threadFont = threadFontButton->font();
KitaConfig::setThreadFont( threadFont );
emit threadFontChanged( threadFont );
}
-void KitaFontPrefPage::FontSelected(const QFont&)
+void KitaFontPrefPage::slotFontButtonClicked()
+{
+ QFont font = fontButton->font();
+
+ if ( KFontDialog::getFont( font, false, this ) == QDialog::Accepted ) {
+ fontButton->setText( font.family() + " " + QString::number( font.pointSize() ) );
+ fontButton->setFont( font );
+ emit changed();
+ }
+}
+
+void KitaFontPrefPage::slotThreadFontButtonClicked()
{
- emit changed();
+ QFont threadFont = threadFontButton->font();
+
+ if ( KFontDialog::getFont( threadFont, false, this ) == QDialog::Accepted ) {
+ threadFontButton->setText( threadFont.family() + " " + QString::number( threadFont.pointSize() ) );
+ threadFontButton->setFont( threadFont );
+ emit changed();
+ }
}
-void KitaFontPrefPage::ThreadFontSelected(const QFont&)
+void KitaFontPrefPage::updateButtons()
{
- emit changed();
+ QFont font = KitaConfig::font();
+ fontButton->setText( font.family() + " " + QString::number( font.pointSize() ) );
+ fontButton->setFont( font );
+
+ QFont threadFont = KitaConfig::threadFont();
+ threadFontButton->setText( threadFont.family() + " " + QString::number( threadFont.pointSize() ) );
+ threadFontButton->setFont( threadFont );
}
KitaColorPrefPage::KitaColorPrefPage( QWidget *parent )
<property name="caption">
<string>Form1</string>
</property>
- <grid>
+ <vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <spacer row="1" column="0">
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>30</width>
- <height>180</height>
- </size>
- </property>
- </spacer>
- <widget class="QLayoutWidget" row="0" column="0">
- <property name="name">
- <cstring>layout4</cstring>
+ <cstring>layout5</cstring>
</property>
- <vbox>
+ <hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>useTabCheckBox</cstring>
- </property>
- <property name="text">
- <string>Use new tab when opening the thread(board).</string>
- </property>
- </widget>
<widget class="QLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>layout4</cstring>
</property>
- <hbox>
+ <vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="QCheckBox">
<property name="name">
- <cstring>MarkLabel</cstring>
+ <cstring>useTabCheckBox</cstring>
</property>
<property name="text">
- <string>Mark new thread to made:</string>
+ <string>Use new tab when opening the thread(board).</string>
</property>
</widget>
- <spacer>
+ <widget class="QLayoutWidget">
<property name="name">
- <cstring>spacer6</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QSpinBox">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>MarkLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Mark new thread to made:</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>MarkTimespinBox</cstring>
+ </property>
+ <property name="prefix">
+ <string>within </string>
+ </property>
+ <property name="suffix">
+ <string> hour</string>
+ </property>
+ <property name="specialValueText">
+ <string>after last access</string>
+ </property>
+ <property name="maxValue">
+ <number>24</number>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>24</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QButtonGroup">
<property name="name">
- <cstring>MarkTimespinBox</cstring>
- </property>
- <property name="prefix">
- <string>within </string>
- </property>
- <property name="suffix">
- <string> hour</string>
- </property>
- <property name="specialValueText">
- <string>after last access</string>
- </property>
- <property name="maxValue">
- <number>24</number>
- </property>
- <property name="minValue">
- <number>0</number>
- </property>
- <property name="value">
- <number>24</number>
- </property>
- <property name="toolTip" stdset="0">
- <string></string>
- </property>
+ <cstring>buttonGroup3</cstring>
+ </property>
+ <property name="title">
+ <string>Thread</string>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>showMailCheckBox</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>40</y>
+ <width>193</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Show mail address in the thread.</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>270</width>
+ <height>16</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>this option affects from the next thread.</string>
+ </property>
+ </widget>
</widget>
- </hbox>
- </widget>
- <widget class="QButtonGroup">
- <property name="name">
- <cstring>buttonGroup3</cstring>
- </property>
- <property name="title">
- <string>Thread</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLabel">
+ <widget class="QButtonGroup">
<property name="name">
- <cstring>textLabel1</cstring>
- </property>
- <property name="text">
- <string>this option affects from the next thread.</string>
- </property>
+ <cstring>viewGroup</cstring>
+ </property>
+ <property name="title">
+ <string>Views</string>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>threePaneRadio</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>50</y>
+ <width>80</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Three pane</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>twoPaneRadio</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>20</y>
+ <width>120</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>(pseudo) Two pane</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="buttonGroupId">
+ <number>0</number>
+ </property>
+ </widget>
</widget>
- <widget class="QCheckBox">
+ <widget class="QButtonGroup">
<property name="name">
- <cstring>showMailCheckBox</cstring>
- </property>
- <property name="text">
- <string>Show mail address in the thread.</string>
- </property>
+ <cstring>orderGroup</cstring>
+ </property>
+ <property name="title">
+ <string>When open the board</string>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>numOrderRadio</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>50</y>
+ <width>185</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Show thread in numerical order</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>unreadFirstRadio</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>20</y>
+ <width>250</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Show unread thread first</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="buttonGroupId">
+ <number>0</number>
+ </property>
+ </widget>
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup">
+ <spacer>
<property name="name">
- <cstring>viewGroup</cstring>
+ <cstring>spacer11</cstring>
</property>
- <property name="title">
- <string>Views</string>
+ <property name="orientation">
+ <enum>Horizontal</enum>
</property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>twoPaneRadio</cstring>
- </property>
- <property name="text">
- <string>(pseudo) Two pane</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="buttonGroupId">
- <number>0</number>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>threePaneRadio</cstring>
- </property>
- <property name="text">
- <string>Three pane</string>
- </property>
- <property name="buttonGroupId">
- <number>1</number>
- </property>
- </widget>
- </vbox>
- </widget>
- <widget class="QButtonGroup">
- <property name="name">
- <cstring>orderGroup</cstring>
+ <property name="sizeType">
+ <enum>Expanding</enum>
</property>
- <property name="title">
- <string>When open the board</string>
+ <property name="sizeHint">
+ <size>
+ <width>285</width>
+ <height>31</height>
+ </size>
</property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>unreadFirstRadio</cstring>
- </property>
- <property name="text">
- <string>Show unread thread first</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="buttonGroupId">
- <number>0</number>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>numOrderRadio</cstring>
- </property>
- <property name="text">
- <string>Show thread in numerical order</string>
- </property>
- <property name="buttonGroupId">
- <number>1</number>
- </property>
- </widget>
- </vbox>
- </widget>
- </vbox>
+ </spacer>
+ </hbox>
</widget>
- <spacer row="0" column="1">
+ <spacer>
<property name="name">
- <cstring>spacer11</cstring>
+ <cstring>spacer2</cstring>
</property>
<property name="orientation">
- <enum>Horizontal</enum>
+ <enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
- <width>241</width>
- <height>31</height>
+ <width>30</width>
+ <height>180</height>
</size>
</property>
</spacer>
- </grid>
+ </vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>