[uim-commit] r440 - trunk/qt/uim-kdehelper/src/pref
kzk at freedesktop.org
kzk at freedesktop.org
Mon Jan 31 12:46:54 PST 2005
Author: kzk
Date: 2005-01-31 12:46:51 -0800 (Mon, 31 Jan 2005)
New Revision: 440
Added:
trunk/qt/uim-kdehelper/src/pref/keyeditformbase.ui
trunk/qt/uim-kdehelper/src/pref/keygrabformbase.ui
Modified:
trunk/qt/uim-kdehelper/src/pref/Makefile.am
trunk/qt/uim-kdehelper/src/pref/customwidgets.cpp
trunk/qt/uim-kdehelper/src/pref/customwidgets.h
trunk/qt/uim-kdehelper/src/pref/olisteditformbase.ui
trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.cpp
trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.h
Log:
* im-kdehelper/src/pref/Makefile.am
- add keyeditformbase.ui keygrabformbase.ui
* uim-kdehelper/src/pref/keygrabformbase.ui
- the dialog to grab the key
* uim-kdehelper/src/pref/keyeditformbase.ui
- the dialog to list up the key
* uim-kdehelper/src/pref/olisteditformbase.ui
- change layouting
* uim-kdehelper/src/pref/uim-pref-qt.h
- implement class SubgroupData's destructor
- implement GroupPageWidget::addCustomTypeKey
* uim-kdehelper/src/uim-pref-qt.cpp
- implement class SubgroupData's destructor
* uim-kdehelper/src/pref/customwidgets.h
* uim-kdehelper/src/pref/customwidgets.cpp
- add key edit support partly
Modified: trunk/qt/uim-kdehelper/src/pref/Makefile.am
===================================================================
--- trunk/qt/uim-kdehelper/src/pref/Makefile.am 2005-01-31 20:39:57 UTC (rev 439)
+++ trunk/qt/uim-kdehelper/src/pref/Makefile.am 2005-01-31 20:46:51 UTC (rev 440)
@@ -4,6 +4,7 @@
noinst_HEADERS = uim-pref-qt.h customwidgets.h kseparator.h
bin_PROGRAMS = uim-pref-qt
-uim_pref_qt_SOURCES = uim-pref-qt.cpp customwidgets.cpp kseparator.cpp olisteditformbase.ui
+uim_pref_qt_SOURCES = uim-pref-qt.cpp customwidgets.cpp kseparator.cpp \
+ olisteditformbase.ui keyeditformbase.ui keygrabformbase.ui
uim_pref_qt_LDFLAGS = $(all_libraries) $(KDE_RPATH) -luim -luim-custom
uim_pref_qt_LDADD = $(LIB_QT) $(LIB_KUTILS)
Modified: trunk/qt/uim-kdehelper/src/pref/customwidgets.cpp
===================================================================
--- trunk/qt/uim-kdehelper/src/pref/customwidgets.cpp 2005-01-31 20:39:57 UTC (rev 439)
+++ trunk/qt/uim-kdehelper/src/pref/customwidgets.cpp 2005-01-31 20:46:51 UTC (rev 440)
@@ -45,7 +45,7 @@
}
void CustomCheckBox::update()
-{
+{
setEnabled( m_custom->is_active );
if( m_custom->is_active )
@@ -71,6 +71,7 @@
setCustom( m_custom );
}
+//----------------------------------------------------------------------------------------
CustomSpinBox::CustomSpinBox( struct uim_custom *c, QWidget *parent, const char *name)
: QSpinBox( parent, name ),
UimCustomItemIface( c )
@@ -108,6 +109,7 @@
setCustom( m_custom );
}
+//----------------------------------------------------------------------------------------
CustomLineEdit::CustomLineEdit( struct uim_custom *c, QWidget *parent, const char *name)
: QLineEdit( parent, name ),
UimCustomItemIface( c )
@@ -147,15 +149,16 @@
setCustom( m_custom );
}
+//----------------------------------------------------------------------------------------
CustomPathnameEdit::CustomPathnameEdit( struct uim_custom *c, QWidget *parent, const char *name)
: QHBox( parent, name ),
UimCustomItemIface( c )
{
setSpacing( 3 );
m_lineEdit = new QLineEdit( this );
- m_lineEdit->setText( m_custom->value->as_pathname );
QObject::connect( m_lineEdit, SIGNAL(textChanged(const QString &)),
this, SLOT(slotCustomTextChanged(const QString &)) );
+
m_fileButton = new QToolButton( this );
m_fileButton->setText( "File" );
QObject::connect( m_fileButton, SIGNAL(clicked()),
@@ -205,6 +208,7 @@
setCustom( m_custom );
}
+//----------------------------------------------------------------------------------------
CustomChoiceCombo::CustomChoiceCombo( struct uim_custom *c, QWidget *parent, const char *name)
: QComboBox( parent, name ),
UimCustomItemIface( c )
@@ -281,6 +285,7 @@
setCustom( m_custom );
}
+//----------------------------------------------------------------------------------------
CustomOrderedListEdit::CustomOrderedListEdit( struct uim_custom *c, QWidget *parent, const char *name )
: QHBox( parent, name ),
UimCustomItemIface( c )
@@ -288,11 +293,10 @@
setSpacing( 3 );
m_lineEdit = new QLineEdit( this );
+ m_lineEdit->setReadOnly( true );
+
m_editButton = new QToolButton( this );
m_editButton->setText( "Edit" );
-
- updateText();
-
QObject::connect( m_editButton, SIGNAL(clicked()),
this, SLOT(slotEditButtonClicked()) );
@@ -561,3 +565,138 @@
}
return activeItemLabelList;
}
+
+//----------------------------------------------------------------------------------------
+CustomKeyEdit::CustomKeyEdit( struct uim_custom *c, QWidget *parent, const char *name )
+ : QHBox( parent, name ),
+ UimCustomItemIface( c )
+{
+ setSpacing( 3 );
+ m_lineEdit = new QLineEdit( this );
+ m_lineEdit->setReadOnly( false );
+
+ m_editButton = new QToolButton( this );
+ m_editButton->setText( "Edit" );
+ QObject::connect( m_editButton, SIGNAL(clicked()),
+ this, SLOT(slotKeyButtonClicked()) );
+
+ update();
+}
+
+void CustomKeyEdit::update()
+{
+ m_lineEdit->setEnabled( m_custom->is_active );
+ m_editButton->setEnabled( m_custom->is_active );
+
+ if( m_custom->is_active )
+ {
+ updateText();
+ }
+}
+
+void CustomKeyEdit::updateText()
+{
+ QString str = QString::null;
+ if (m_custom->value->as_key) {
+ struct uim_custom_key *key = NULL;
+ int i = 0;
+ for (key = m_custom->value->as_key[0], i = 0;
+ key;
+ key = m_custom->value->as_key[++i])
+ {
+ if( i != 0 )
+ str.append(",");
+ str.append( key->literal );
+ }
+ } else {
+ /* error message */
+ }
+ m_lineEdit->setText( str );
+}
+
+
+void CustomKeyEdit::setDefault()
+{
+ /* free old items */
+ int num = 0;
+ for( num = 0; m_custom->value->as_key[num]; num++ )
+ ;
+
+ for( int i = 0; i < num; i++ )
+ {
+ free( m_custom->value->as_key[i]->literal );
+ free( m_custom->value->as_key[i]->label );
+ free( m_custom->value->as_key[i]->desc );
+ free( m_custom->value->as_key[i] );
+ }
+
+ /* copy default_value to value */
+ int default_num = 0;
+ for( default_num = 0; m_custom->default_value->as_key[default_num]; default_num++ )
+ ;
+
+ m_custom->value->as_key = (struct uim_custom_key **)realloc( m_custom->value->as_key,
+ sizeof(struct uim_custom_key *) * (default_num + 1) );
+
+ for( int i = 0; i < default_num; i++ )
+ {
+ struct uim_custom_key *default_item = m_custom->default_value->as_key[i];
+ struct uim_custom_key *item = (struct uim_custom_key *)malloc(sizeof(struct uim_custom_key));
+
+ item->type = default_item->type;
+ item->editor_type = default_item->editor_type;
+ item->literal = default_item->literal ? strdup(default_item->literal) : NULL;
+ item->label = default_item->label ? strdup(default_item->label) : NULL;
+ item->desc = default_item->desc ? strdup(default_item->desc) : NULL;
+
+ m_custom->value->as_key[i] = item;
+ }
+ m_custom->value->as_key[default_num] = NULL; /* NULL-terminated */
+
+ setCustom( m_custom );
+ update();
+}
+
+void CustomKeyEdit::slotKeyButtonClicked()
+{
+ KeyEditForm *d = new KeyEditForm( this );
+ if( d->exec() == KeyEditForm::Accepted )
+ {
+ ;
+ }
+}
+
+KeyEditForm::KeyEditForm( QWidget *parent, const char *name )
+ : KeyEditFormBase( parent, name )
+{
+ m_editButton->setEnabled( false );
+
+ QObject::connect( m_addButton, SIGNAL(clicked()),
+ this, SLOT(slotAddClicked()) );
+
+ QObject::connect( m_listView, SIGNAL(selectionChanged(QListViewItem *)),
+ this, SLOT(slotSelectionChanged(QListViewItem*)) );
+}
+
+void KeyEditForm::slotAddClicked()
+{
+ KeyGrabForm *d = new KeyGrabForm( this );
+ if( d->exec() == KeyGrabForm::Accepted )
+ {
+ ;
+ }
+}
+
+void KeyEditForm::slotSelectionChanged( QListViewItem *item )
+{
+ if( item )
+ {
+ m_editButton->setEnabled( true );
+ }
+}
+
+KeyGrabForm::KeyGrabForm( QWidget *parent, const char *name )
+ : KeyGrabFormBase( parent, name )
+{
+
+}
Modified: trunk/qt/uim-kdehelper/src/pref/customwidgets.h
===================================================================
--- trunk/qt/uim-kdehelper/src/pref/customwidgets.h 2005-01-31 20:39:57 UTC (rev 439)
+++ trunk/qt/uim-kdehelper/src/pref/customwidgets.h 2005-01-31 20:46:51 UTC (rev 440)
@@ -56,6 +56,8 @@
#include <qptrlist.h>
#include "olisteditformbase.h"
+#include "keyeditformbase.h"
+#include "keygrabformbase.h"
class UimCustomItemIface
{
@@ -107,6 +109,7 @@
struct uim_custom *m_custom;
};
+//----------------------------------------------------------------------------------------
class CustomCheckBox : public QCheckBox, public UimCustomItemIface
{
Q_OBJECT
@@ -124,6 +127,7 @@
void customValueChanged();
};
+//----------------------------------------------------------------------------------------
class CustomSpinBox : public QSpinBox, public UimCustomItemIface
{
Q_OBJECT
@@ -141,6 +145,7 @@
void customValueChanged();
};
+//----------------------------------------------------------------------------------------
class CustomLineEdit : public QLineEdit, public UimCustomItemIface
{
Q_OBJECT
@@ -150,7 +155,7 @@
virtual void update();
virtual void setDefault();
-public slots:
+protected slots:
void slotCustomTextChanged( const QString &text );
protected:
void currentCustomValueChanged(){ emit customValueChanged(); }
@@ -158,6 +163,7 @@
void customValueChanged();
};
+//----------------------------------------------------------------------------------------
class CustomPathnameEdit : public QHBox, public UimCustomItemIface
{
Q_OBJECT
@@ -179,6 +185,7 @@
void customValueChanged();
};
+//----------------------------------------------------------------------------------------
class CustomChoiceCombo : public QComboBox, public UimCustomItemIface
{
Q_OBJECT
@@ -188,7 +195,7 @@
virtual void update();
virtual void setDefault();
-public slots:
+protected slots:
void slotActivated( int index );
protected:
void currentCustomValueChanged(){ emit customValueChanged(); }
@@ -196,6 +203,7 @@
void customValueChanged();
};
+//----------------------------------------------------------------------------------------
class CustomOrderedListEdit : public QHBox, public UimCustomItemIface
{
Q_OBJECT
@@ -205,7 +213,7 @@
virtual void update();
virtual void setDefault();
-public slots:
+protected slots:
void slotEditButtonClicked();
private:
QLineEdit *m_lineEdit;
@@ -234,4 +242,45 @@
void downItem();
};
+//----------------------------------------------------------------------------------------
+class CustomKeyEdit : public QHBox, public UimCustomItemIface
+{
+ Q_OBJECT
+
+public:
+ CustomKeyEdit( struct uim_custom *c, QWidget *parent, const char *name = 0 );
+
+ virtual void update();
+ virtual void setDefault();
+protected:
+ void updateText();
+protected slots:
+ void slotKeyButtonClicked();
+private:
+ QLineEdit *m_lineEdit;
+ QToolButton *m_editButton;
+protected:
+ void currentCustomValueChanged(){ emit customValueChanged(); }
+signals:
+ void customValueChanged();
+};
+
+class KeyEditForm : public KeyEditFormBase {
+ Q_OBJECT
+
+public:
+ KeyEditForm( QWidget *parent = 0, const char *name = 0 );
+
+protected slots:
+ void slotAddClicked();
+ void slotSelectionChanged( QListViewItem * );
+};
+
+class KeyGrabForm : public KeyGrabFormBase {
+ Q_OBJECT
+
+public:
+ KeyGrabForm( QWidget *parent = 0, const char *name = 0 );
+};
+
#endif /* Not def: _CUSTOMWIDGETS_H_ */
Added: trunk/qt/uim-kdehelper/src/pref/keyeditformbase.ui
===================================================================
--- trunk/qt/uim-kdehelper/src/pref/keyeditformbase.ui 2005-01-31 20:39:57 UTC (rev 439)
+++ trunk/qt/uim-kdehelper/src/pref/keyeditformbase.ui 2005-01-31 20:46:51 UTC (rev 440)
@@ -0,0 +1,140 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KeyEditFormBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>KeyEditFormBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>392</width>
+ <height>229</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>KeyEditDialog</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout9</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QListView">
+ <column>
+ <property name="text">
+ <string>Key Combination</string>
+ </property>
+ <property name="clickable">
+ <bool>false</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>m_listView</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout8</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_addButton</cstring>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_removeButton</cstring>
+ </property>
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_editButton</cstring>
+ </property>
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>77</width>
+ <height>50</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_okButton</cstring>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_cancelButton</cstring>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>m_okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>KeyEditFormBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>m_cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>KeyEditFormBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
Added: trunk/qt/uim-kdehelper/src/pref/keygrabformbase.ui
===================================================================
--- trunk/qt/uim-kdehelper/src/pref/keygrabformbase.ui 2005-01-31 20:39:57 UTC (rev 439)
+++ trunk/qt/uim-kdehelper/src/pref/keygrabformbase.ui 2005-01-31 20:46:51 UTC (rev 440)
@@ -0,0 +1,161 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>KeyGrabFormBase</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>KeyGrabFormBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>275</width>
+ <height>180</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>KeyGrabDialog</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string><p align="center">Press any key to grab...</p></string>
+ </property>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>line1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout3</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>m_altCheckBox</cstring>
+ </property>
+ <property name="text">
+ <string>Alt</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string><p align="center">+</p></string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="2">
+ <property name="name">
+ <cstring>m_keyLineEdit</cstring>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>m_shiftCheckBox</cstring>
+ </property>
+ <property name="text">
+ <string>Shift</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>m_controlCheckBox</cstring>
+ </property>
+ <property name="text">
+ <string>Control</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>line2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_okButton</cstring>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_cancelButton</cstring>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>m_okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>KeyGrabFormBase</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>m_cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>KeyGrabFormBase</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
Modified: trunk/qt/uim-kdehelper/src/pref/olisteditformbase.ui
===================================================================
--- trunk/qt/uim-kdehelper/src/pref/olisteditformbase.ui 2005-01-31 20:39:57 UTC (rev 439)
+++ trunk/qt/uim-kdehelper/src/pref/olisteditformbase.ui 2005-01-31 20:46:51 UTC (rev 440)
@@ -23,102 +23,99 @@
<property name="caption">
<string>OListEditBase</string>
</property>
- <widget class="QLayoutWidget">
+ <grid>
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>unnamed</cstring>
</property>
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>360</width>
- <height>180</height>
- </rect>
- </property>
- <hbox>
+ <widget class="QLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>unnamed</cstring>
+ <cstring>layout3</cstring>
</property>
- <widget class="QListView">
- <column>
- <property name="text">
- <string>Available Items</string>
- </property>
- <property name="clickable">
- <bool>false</bool>
- </property>
- <property name="resizable">
- <bool>true</bool>
- </property>
- </column>
+ <hbox>
<property name="name">
- <cstring>m_listView</cstring>
+ <cstring>unnamed</cstring>
</property>
- <property name="selectionMode">
- <enum>Single</enum>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout2</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QPushButton">
- <property name="name">
- <cstring>m_upButton</cstring>
- </property>
+ <widget class="QListView">
+ <column>
<property name="text">
- <string>Up</string>
+ <string>Available Items</string>
</property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>m_downButton</cstring>
+ <property name="clickable">
+ <bool>false</bool>
</property>
- <property name="text">
- <string>Down</string>
+ <property name="resizable">
+ <bool>true</bool>
</property>
- </widget>
- <spacer>
+ </column>
+ <property name="name">
+ <cstring>m_listView</cstring>
+ </property>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <vbox>
<property name="name">
- <cstring>spacer2</cstring>
+ <cstring>unnamed</cstring>
</property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>140</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>m_okButton</cstring>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>m_cancelButton</cstring>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- </vbox>
- </widget>
- </hbox>
- </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_upButton</cstring>
+ </property>
+ <property name="text">
+ <string>Up</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_downButton</cstring>
+ </property>
+ <property name="text">
+ <string>Down</string>
+ </property>
+ </widget>
+ <spacer>
+ <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>20</width>
+ <height>140</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_okButton</cstring>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_cancelButton</cstring>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
</widget>
<connections>
<connection>
Modified: trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.cpp
===================================================================
--- trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.cpp 2005-01-31 20:39:57 UTC (rev 439)
+++ trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.cpp 2005-01-31 20:46:51 UTC (rev 440)
@@ -449,7 +449,16 @@
UimCustomItemIface *GroupPageWidget::addCustomTypeKey( QVGroupBox *vbox, struct uim_custom *custom )
{
// FIXME: not implemented yet
- return NULL;
+ QHBox *hbox = new QHBox( vbox );
+ hbox->setSpacing( 6 );
+ QLabel *label = new QLabel( _FU8(custom->label), hbox );
+ CustomKeyEdit *keyEditBox = new CustomKeyEdit( custom, hbox );
+ label->setBuddy( keyEditBox );
+
+ QObject::connect( keyEditBox, SIGNAL(customValueChanged()),
+ this, SLOT(slotCustomValueChanged()) );
+
+ return keyEditBox;
}
void GroupPageWidget::setDefault()
@@ -505,6 +514,11 @@
uim_custom_symbol_list_free( sub_groups );
}
+SubgroupData::~SubgroupData()
+{
+ gvboxMap.clear();
+}
+
QVGroupBox * SubgroupData::searchGroupVBoxByCustomSym( const char *custom_sym )
{
QVGroupBox *b = gvboxMap[QString(custom_sym)];
Modified: trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.h
===================================================================
--- trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.h 2005-01-31 20:39:57 UTC (rev 439)
+++ trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.h 2005-01-31 20:46:51 UTC (rev 440)
@@ -129,6 +129,7 @@
class SubgroupData {
public:
SubgroupData( QWidget *parentWidget, const char *parent_group_name );
+ ~SubgroupData();
QVGroupBox *searchGroupVBoxByCustomSym( const char *custom_sym );
protected:
More information about the Uim-commit
mailing list