Permalink
Browse files

git-svn-id: https://k9copy.svn.sourceforge.net/svnroot/k9copy/trunk@237

… 250c61c0-cc0d-0410-af45-d4f8fccfe43b
  • Loading branch information...
1 parent 63a1640 commit 784365a6d5d6246a3446adf4b1a62b037e3adc54 jnmchlptt committed Oct 7, 2007
Showing with 352 additions and 0 deletions.
  1. +60 −0 src/k9prefauthor.cpp
  2. +41 −0 src/k9prefauthor.h
  3. +251 −0 src/prefAuthor.ui
View
@@ -0,0 +1,60 @@
+//
+// C++ Implementation:
+//
+// Description:
+//
+//
+// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include "k9prefauthor.h"
+#include "k9config.h"
+#include <qcombobox.h>
+#include <knuminput.h>
+#include <kcolorbutton.h>
+#include <kfontdialog.h>
+
+k9prefAuthor::k9prefAuthor(QWidget* parent, const char* name, WFlags fl)
+: prefAuthor(parent,name,fl)
+{
+ load();
+}
+
+void k9prefAuthor::load() {
+ k9Config config;
+ cbAudioFormat->setCurrentText(config.getPrefAudioFormat());
+ cbAudioBitrate->setCurrentText(QString::number(config.getPrefAudioBitrate()));
+ inButtonWidth->setValue(config.getPrefButtonWidth());
+ inButtonHeight->setValue(config.getPrefButtonHeight());
+ cbHiliteColor->setColor(config.getPrefButtonHiliteColor());
+ cbTextColor->setColor(config.getPrefButtonTextColor());
+ m_font=config.getPrefButtonFont();
+}
+
+k9prefAuthor::~k9prefAuthor()
+{
+}
+
+/*$SPECIALIZATION$*/
+void k9prefAuthor::bButtonFontClicked()
+{
+ KFontDialog::getFont( m_font );
+}
+
+void k9prefAuthor::save() {
+ k9Config config;
+ config.setPrefAudioFormat(cbAudioFormat->currentText());
+ config.setPrefAudioBitrate(cbAudioBitrate->currentText().toInt());
+ config.setPrefButtonWidth(inButtonWidth->value());
+ config.setPrefButtonHeight(inButtonHeight->value());
+ config.setPrefButtonHiliteColor(cbHiliteColor->color());
+ config.setPrefButtonFont(m_font);
+ config.setPrefButtonTextColor(cbTextColor->color());
+ config.save();
+}
+
+#include "k9prefauthor.moc"
+
View
@@ -0,0 +1,41 @@
+//
+// C++ Interface:
+//
+// Description:
+//
+//
+// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef K9PREFAUTHOR_H
+#define K9PREFAUTHOR_H
+#include "k9common.h"
+#include "prefAuthor.h"
+#include <qfont.h>
+
+class k9prefAuthor : public prefAuthor
+{
+ Q_OBJECT
+
+public:
+ k9prefAuthor(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~k9prefAuthor();
+ /*$PUBLIC_FUNCTIONS$*/
+ void load();
+public slots:
+ /*$PUBLIC_SLOTS$*/
+ virtual void bButtonFontClicked();
+ virtual void save();
+protected:
+ /*$PROTECTED_FUNCTIONS$*/
+ QFont m_font;
+protected slots:
+ /*$PROTECTED_SLOTS$*/
+
+};
+
+#endif
+
View
@@ -0,0 +1,251 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>prefAuthor</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>prefAuthor</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Authoring options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Audio</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>AC3</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>MP2</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>cbAudioFormat</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>128</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>192</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>320</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>cbAudioBitrate</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Format</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Bitrate</string>
+ </property>
+ </widget>
+ <spacer row="0" column="2" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>151</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>60</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox2</cstring>
+ </property>
+ <property name="title">
+ <string>Buttons</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Width</string>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>121</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Height</string>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="1" column="1">
+ <property name="name">
+ <cstring>inButtonHeight</cstring>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="maxValue">
+ <number>480</number>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="0" column="1">
+ <property name="name">
+ <cstring>inButtonWidth</cstring>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="maxValue">
+ <number>700</number>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>bButtonFont</cstring>
+ </property>
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Hilite color</string>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="2" column="1">
+ <property name="name">
+ <cstring>cbHiliteColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel6_2</cstring>
+ </property>
+ <property name="text">
+ <string>Text color</string>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="3" column="1">
+ <property name="name">
+ <cstring>cbTextColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>bButtonFont</sender>
+ <signal>clicked()</signal>
+ <receiver>prefAuthor</receiver>
+ <slot>bButtonFontClicked()</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>bButtonFontClicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>knuminput.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+</includehints>
+</UI>

0 comments on commit 784365a

Please sign in to comment.