[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Camino-devel] camino/src/client DialogTheme.cpp DialogThemeUI.ui
From: |
Pascal Audoux |
Subject: |
[Camino-devel] camino/src/client DialogTheme.cpp DialogThemeUI.ui |
Date: |
Sat, 01 Feb 2003 05:48:27 -0500 |
CVSROOT: /cvsroot/camino
Module name: camino
Changes by: Pascal Audoux <address@hidden> 03/02/01 05:48:27
Modified files:
src/client : DialogTheme.cpp DialogThemeUI.ui
Log message:
improve 'select theme' dialog
Patches:
Index: camino/src/client/DialogTheme.cpp
diff -u camino/src/client/DialogTheme.cpp:1.1
camino/src/client/DialogTheme.cpp:1.2
--- camino/src/client/DialogTheme.cpp:1.1 Sat Feb 1 03:18:38 2003
+++ camino/src/client/DialogTheme.cpp Sat Feb 1 05:48:27 2003
@@ -2,7 +2,7 @@
**
** Camino
**
-** Version : $Id: DialogTheme.cpp,v 1.1 2003/02/01 08:18:38 Audoux Exp $
+** Version : $Id: DialogTheme.cpp,v 1.2 2003/02/01 10:48:27 Audoux Exp $
**
** Author(s) : Philippe Fremy, Pascal Audoux
** Creation : 01/02/2003
@@ -24,6 +24,8 @@
// generic include files
// include files for QT
+#include <qcombobox.h>
+#include <qdir.h>
// application specific include files
#include "DialogTheme.h"
@@ -31,16 +33,27 @@
DialogTheme::DialogTheme( QWidget * parent, const char * name )
:DialogThemeUI( parent, name, true )
{
-
+ QDir themeDir( "./themes" );
+ QStringList list = themeDir.entryList( QDir::Dirs );
+ list.remove( "CVS" );
+ list.remove( "." );
+ list.remove( ".." );
+ _themeCombo->insertStringList( list );
+ _themeCombo->setCurrentItem( 0 );
}
QString DialogTheme::getTheme()
{
- return QString( "" );
+ return _themeCombo->currentText();
}
void DialogTheme::setTheme( QString theme )
{
-
+ for( int i = 0; i < _themeCombo->count(); i++ ) {
+ if( _themeCombo->text( i ) == theme ) {
+ _themeCombo->setCurrentItem( i );
+ break;
+ }
+ }
}
Index: camino/src/client/DialogThemeUI.ui
diff -u camino/src/client/DialogThemeUI.ui:1.1
camino/src/client/DialogThemeUI.ui:1.2
--- camino/src/client/DialogThemeUI.ui:1.1 Sat Feb 1 03:18:38 2003
+++ camino/src/client/DialogThemeUI.ui Sat Feb 1 05:48:27 2003
@@ -8,42 +8,176 @@
<rect>
<x>0</x>
<y>0</y>
- <width>210</width>
- <height>67</height>
+ <width>290</width>
+ <height>94</height>
</rect>
</property>
<property name="caption">
<string>Change theme</string>
</property>
- <widget class="QLabel">
+ <vbox>
<property name="name">
- <cstring>textLabel1</cstring>
+ <cstring>unnamed</cstring>
</property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>100</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>Choose a theme:</string>
- </property>
- </widget>
- <widget class="QComboBox">
- <property name="name">
- <cstring>comboBox1</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>110</x>
- <y>20</y>
- <width>85</width>
- <height>22</height>
- </rect>
- </property>
- </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Choose a theme:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <property name="name">
+ <cstring>_themeCombo</cstring>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>_pbOk</cstring>
+ </property>
+ <property name="text">
+ <string>Ok</string>
+ </property>
+ </widget>
+ <spacer>
+ <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>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>_pbCan</cstring>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ <spacer>
+ <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>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
</widget>
+<connections>
+ <connection>
+ <sender>_pbOk</sender>
+ <signal>clicked()</signal>
+ <receiver>DialogThemeUI</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>_pbCan</sender>
+ <signal>clicked()</signal>
+ <receiver>DialogThemeUI</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
<layoutdefaults spacing="6" margin="11"/>
</UI>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Camino-devel] camino/src/client DialogTheme.cpp DialogThemeUI.ui,
Pascal Audoux <=