Port to uic4

svn path=/trunk/KDE/kdebase/workspace/; revision=601561
This commit is contained in:
Laurent Montel 2006-11-03 16:35:38 +00:00
parent 1685b6112c
commit cb0aca57ad
8 changed files with 325 additions and 343 deletions

View file

@ -4,7 +4,8 @@ ADD_DEFINITIONS(-DKCMRULES)
########### next target ############### ########### next target ###############
set(kwinrules_SRCS ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp) set(kwinrules_SRCS ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp)
kde4_add_ui3_files(kwinrules_SRCS ruleswidgetbase.ui ruleslistbase.ui detectwidgetbase.ui editshortcutbase.ui ) kde4_add_ui_files(kwinrules_SRCS ruleslistbase.ui detectwidgetbase.ui)
kde4_add_ui3_files(kwinrules_SRCS ruleswidgetbase.ui editshortcutbase.ui )
set(kwin_rules_dialog_KDEINIT_SRCS main.cpp ${kwinrules_SRCS}) set(kwin_rules_dialog_KDEINIT_SRCS main.cpp ${kwinrules_SRCS})

View file

@ -40,8 +40,8 @@
namespace KWinInternal namespace KWinInternal
{ {
DetectWidget::DetectWidget( QWidget* parent, const char* name ) DetectWidget::DetectWidget( QWidget* parent )
: DetectWidgetBase( parent, name ) : DetectWidgetBase( parent )
{ {
} }

View file

@ -20,7 +20,7 @@
#ifndef __DETECTWIDGET_H__ #ifndef __DETECTWIDGET_H__
#define __DETECTWIDGET_H__ #define __DETECTWIDGET_H__
#include "detectwidgetbase.h" #include "ui_detectwidgetbase.h"
#include <kdialog.h> #include <kdialog.h>
#include <kwin.h> #include <kwin.h>
@ -33,12 +33,21 @@
namespace KWinInternal namespace KWinInternal
{ {
class DetectWidgetBase : public QWidget, public Ui::DetectWidgetBase
{
public:
DetectWidgetBase( QWidget *parent ) : QWidget( parent ) {
setupUi( this );
}
};
class DetectWidget class DetectWidget
: public DetectWidgetBase : public DetectWidgetBase
{ {
Q_OBJECT Q_OBJECT
public: public:
DetectWidget( QWidget* parent = NULL, const char* name = NULL ); DetectWidget( QWidget* parent = NULL );
}; };
class DetectDialog class DetectDialog

View file

@ -1,218 +1,232 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <ui version="4.0" stdsetdef="1" >
<class>KWinInternal::DetectWidgetBase</class> <author></author>
<widget class="QWidget"> <comment></comment>
<property name="name"> <exportmacro></exportmacro>
<cstring>DetectWidgetBase</cstring> <class>KWinInternal::DetectWidgetBase</class>
<widget class="QWidget" name="KWinInternal::DetectWidgetBase" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>523</width>
<height>325</height>
</rect>
</property> </property>
<property name="geometry"> <layout class="QGridLayout" >
<rect> <property name="margin" >
<x>0</x> <number>0</number>
<y>0</y> </property>
<width>523</width> <item rowspan="1" row="9" column="0" colspan="2" >
<height>325</height> <spacer name="spacer1" >
</rect> <property name="sizeHint" >
</property> <size>
<grid> <width>20</width>
<property name="name"> <height>40</height>
<cstring>unnamed</cstring> </size>
</property> </property>
<property name="margin"> <property name="sizeType" >
<number>0</number> <enum>Expanding</enum>
</property> </property>
<spacer row="9" column="0" rowspan="1" colspan="2"> <property name="orientation" >
<property name="name"> <enum>Qt::Vertical</enum>
<cstring>spacer1</cstring> </property>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer> </spacer>
<widget class="QLabel" row="6" column="0"> </item>
<property name="name"> <item row="6" column="0" >
<cstring>textLabel11</cstring> <widget class="QLabel" name="textLabel11" >
</property> <property name="text" >
<property name="text"> <string>Extra role:</string>
<string>Extra role:</string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> </item>
<property name="name"> <item row="2" column="0" >
<cstring>textLabel1</cstring> <widget class="QLabel" name="textLabel1" >
</property> <property name="text" >
<property name="text"> <string>Class:</string>
<string>Class:</string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> </item>
<property name="name"> <item row="3" column="0" >
<cstring>textLabel3</cstring> <widget class="QLabel" name="textLabel3" >
</property> <property name="text" >
<property name="text"> <string>Role:</string>
<string>Role:</string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="4" column="1"> </item>
<property name="name"> <item row="4" column="1" >
<cstring>type_label</cstring> <widget class="QLabel" name="type_label" >
</property> <property name="text" >
<property name="text"> <string/>
<string></string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="5" column="0"> </item>
<property name="name"> <item row="5" column="0" >
<cstring>textLabel8</cstring> <widget class="QLabel" name="textLabel8" >
</property> <property name="text" >
<property name="text"> <string>Title:</string>
<string>Title:</string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> </item>
<property name="name"> <item row="2" column="1" >
<cstring>class_label</cstring> <widget class="QLabel" name="class_label" >
</property> <property name="text" >
<property name="text"> <string/>
<string></string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="3" column="1"> </item>
<property name="name"> <item row="3" column="1" >
<cstring>role_label</cstring> <widget class="QLabel" name="role_label" >
</property> <property name="text" >
<property name="text"> <string/>
<string></string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="5" column="1"> </item>
<property name="name"> <item row="5" column="1" >
<cstring>title_label</cstring> <widget class="QLabel" name="title_label" >
</property> <property name="text" >
<property name="text"> <string/>
<string></string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="7" column="1"> </item>
<property name="name"> <item row="7" column="1" >
<cstring>machine_label</cstring> <widget class="QLabel" name="machine_label" >
</property> <property name="text" >
<property name="text"> <string/>
<string></string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="4" column="0"> </item>
<property name="name"> <item row="4" column="0" >
<cstring>textLabel4</cstring> <widget class="QLabel" name="textLabel4" >
</property> <property name="text" >
<property name="text"> <string>Type:</string>
<string>Type:</string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="6" column="1"> </item>
<property name="name"> <item row="6" column="1" >
<cstring>extrarole_label</cstring> <widget class="QLabel" name="extrarole_label" >
</property> <property name="text" >
<property name="text"> <string/>
<string></string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QLabel" row="7" column="0"> </item>
<property name="name"> <item row="7" column="0" >
<cstring>textLabel13</cstring> <widget class="QLabel" name="textLabel13" >
</property> <property name="text" >
<property name="text"> <string>Machine:</string>
<string>Machine:</string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="Line" row="1" column="0" rowspan="1" colspan="2"> </item>
<property name="name"> <item rowspan="1" row="1" column="0" colspan="2" >
<cstring>line1</cstring> <widget class="Line" name="line1" >
</property> <property name="frameShape" >
<property name="frameShape"> <enum>QFrame::HLine</enum>
<enum>HLine</enum> </property>
</property> <property name="frameShadow" >
<property name="frameShadow"> <enum>QFrame::Sunken</enum>
<enum>Sunken</enum> </property>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget> </widget>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> </item>
<property name="name"> <item rowspan="1" row="0" column="0" colspan="2" >
<cstring>textLabel9</cstring> <widget class="QLabel" name="textLabel9" >
</property> <property name="text" >
<property name="text"> <string>Information About Selected Window</string>
<string>Information About Selected Window</string> </property>
</property> <property name="wordWrap" >
<bool>false</bool>
</property>
</widget> </widget>
<widget class="QButtonGroup" row="8" column="0" rowspan="1" colspan="2"> </item>
<property name="name"> <item rowspan="1" row="8" column="0" colspan="2" >
<cstring>buttonGroup1</cstring> <widget class="Q3ButtonGroup" name="buttonGroup1" >
<property name="title" >
<string/>
</property>
<layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property> </property>
<property name="title"> <item>
<string></string> <widget class="QRadioButton" name="use_class" >
</property> <property name="text" >
<vbox> <string>Use window &amp;class (whole application)</string>
<property name="name">
<cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <property name="checked" >
<property name="name"> <bool>true</bool>
<cstring>use_class</cstring> </property>
</property> <property name="whatsThis" stdset="0" >
<property name="text"> <string>For selecting all windows belonging to a specific application, selecting only window class should usually work.</string>
<string>Use window &amp;class (whole application)</string> </property>
</property> </widget>
<property name="checked"> </item>
<bool>true</bool> <item>
</property> <widget class="QRadioButton" name="use_role" >
<property name="whatsThis" stdset="0"> <property name="text" >
<string>For selecting all windows belonging to a specific application, selecting only window class should usually work.</string> <string>Use window class and window &amp;role (specific window)</string>
</property> </property>
</widget> <property name="whatsThis" stdset="0" >
<widget class="QRadioButton"> <string>For selecting a specific window in an application, both window class and window role should be selected. Window class will determine the application, and window role the specific window in the application; many applications do not provide useful window roles though.</string>
<property name="name"> </property>
<cstring>use_role</cstring> </widget>
</property> </item>
<property name="text"> <item>
<string>Use window class and window &amp;role (specific window)</string> <widget class="QRadioButton" name="use_whole_class" >
</property> <property name="text" >
<property name="whatsThis" stdset="0"> <string>Use &amp;whole window class (specific window)</string>
<string>For selecting a specific window in an application, both window class and window role should be selected. Window class will determine the application, and window role the specific window in the application; many applications do not provide useful window roles though.</string> </property>
</property> <property name="whatsThis" stdset="0" >
</widget> <string>With some (non-KDE) applications whole window class can be sufficient for selecting a specific window in an application, as they set whole window class to contain both application and window role.</string>
<widget class="QRadioButton"> </property>
<property name="name"> </widget>
<cstring>use_whole_class</cstring> </item>
</property> <item>
<property name="text"> <widget class="QCheckBox" name="match_title" >
<string>Use &amp;whole window class (specific window)</string> <property name="text" >
</property> <string>Match also window &amp;title</string>
<property name="whatsThis" stdset="0"> </property>
<string>With some (non-KDE) applications whole window class can be sufficient for selecting a specific window in an application, as they set whole window class to contain both application and window role.</string> </widget>
</property> </item>
</widget> </layout>
<widget class="QCheckBox">
<property name="name">
<cstring>match_title</cstring>
</property>
<property name="text">
<string>Match also window &amp;title</string>
</property>
</widget>
</vbox>
</widget> </widget>
</grid> </item>
</widget> </layout>
<layoutdefaults spacing="6" margin="11"/> </widget>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutdefault spacing="6" margin="11" />
</UI> <layoutfunction spacing="KDialog::spacingHint" margin="KDialog::marginHint" />
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
</ui>

View file

@ -29,8 +29,8 @@
namespace KWinInternal namespace KWinInternal
{ {
KCMRulesList::KCMRulesList( QWidget* parent, const char* name ) KCMRulesList::KCMRulesList( QWidget* parent)
: KCMRulesListBase( parent, name ) : KCMRulesListBase( parent)
{ {
// connect both current/selected, so that current==selected (stupid QListBox :( ) // connect both current/selected, so that current==selected (stupid QListBox :( )
connect( rules_listbox, SIGNAL( currentChanged( Q3ListBoxItem* )), connect( rules_listbox, SIGNAL( currentChanged( Q3ListBoxItem* )),

View file

@ -20,7 +20,7 @@
#ifndef __RULESLIST_H__ #ifndef __RULESLIST_H__
#define __RULESLIST_H__ #define __RULESLIST_H__
#include "ruleslistbase.h" #include "ui_ruleslistbase.h"
@ -31,12 +31,21 @@ class Q3ListBoxItem;
namespace KWinInternal namespace KWinInternal
{ {
class KCMRulesListBase : public QWidget, public Ui::KCMRulesListBase
{
public:
KCMRulesListBase( QWidget *parent ) : QWidget( parent ) {
setupUi( this );
}
};
class KCMRulesList class KCMRulesList
: public KCMRulesListBase : public KCMRulesListBase
{ {
Q_OBJECT Q_OBJECT
public: public:
KCMRulesList( QWidget* parent = NULL, const char* name = NULL ); KCMRulesList( QWidget* parent = NULL );
virtual ~KCMRulesList(); virtual ~KCMRulesList();
void load(); void load();
void save(); void save();

View file

@ -1,95 +1,91 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <ui version="4.0" stdsetdef="1" >
<class>KWinInternal::KCMRulesListBase</class> <author></author>
<widget class="QWidget"> <comment></comment>
<property name="name"> <exportmacro></exportmacro>
<cstring>KCMRulesListBase</cstring> <class>KWinInternal::KCMRulesListBase</class>
<widget class="QWidget" name="KWinInternal::KCMRulesListBase" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>480</height>
</rect>
</property> </property>
<property name="geometry"> <layout class="QGridLayout" >
<rect> <property name="margin" >
<x>0</x> <number>0</number>
<y>0</y> </property>
<width>600</width> <item rowspan="6" row="0" column="0" colspan="1" >
<height>480</height> <widget class="KListBox" name="rules_listbox" />
</rect> </item>
</property> <item row="0" column="1" >
<grid> <widget class="KPushButton" name="new_button" >
<property name="name"> <property name="text" >
<cstring>unnamed</cstring> <string>&amp;New...</string>
</property> </property>
<property name="margin">
<number>0</number>
</property>
<widget class="KListBox" row="0" column="0" rowspan="6" colspan="1">
<property name="name">
<cstring>rules_listbox</cstring>
</property>
</widget> </widget>
<widget class="KPushButton" row="0" column="1"> </item>
<property name="name"> <item row="1" column="1" >
<cstring>new_button</cstring> <widget class="KPushButton" name="modify_button" >
</property> <property name="text" >
<property name="text"> <string>&amp;Modify...</string>
<string>&amp;New...</string> </property>
</property>
</widget> </widget>
<widget class="KPushButton" row="1" column="1"> </item>
<property name="name"> <item row="2" column="1" >
<cstring>modify_button</cstring> <widget class="KPushButton" name="delete_button" >
</property> <property name="text" >
<property name="text"> <string>Delete</string>
<string>&amp;Modify...</string> </property>
</property> <property name="shortcut" >
<string/>
</property>
</widget> </widget>
<widget class="KPushButton" row="2" column="1"> </item>
<property name="name"> <item row="3" column="1" >
<cstring>delete_button</cstring> <widget class="KPushButton" name="moveup_button" >
</property> <property name="text" >
<property name="text"> <string>Move &amp;Up</string>
<string>Delete</string> </property>
</property>
<property name="accel">
<string></string>
</property>
</widget> </widget>
<widget class="KPushButton" row="3" column="1"> </item>
<property name="name"> <item row="4" column="1" >
<cstring>moveup_button</cstring> <widget class="KPushButton" name="movedown_button" >
</property> <property name="text" >
<property name="text"> <string>Move &amp;Down</string>
<string>Move &amp;Up</string> </property>
</property>
</widget> </widget>
<widget class="KPushButton" row="4" column="1"> </item>
<property name="name"> <item row="5" column="1" >
<cstring>movedown_button</cstring> <spacer name="spacer1" >
</property> <property name="sizeHint" >
<property name="text"> <size>
<string>Move &amp;Down</string> <width>20</width>
</property> <height>294</height>
</widget> </size>
<spacer row="5" column="1"> </property>
<property name="name"> <property name="sizeType" >
<cstring>spacer1</cstring> <enum>Expanding</enum>
</property> </property>
<property name="orientation"> <property name="orientation" >
<enum>Vertical</enum> <enum>Vertical</enum>
</property> </property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>294</height>
</size>
</property>
</spacer> </spacer>
</grid> </item>
</widget> </layout>
<layoutdefaults spacing="6" margin="11"/> </widget>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutdefault spacing="6" margin="11" />
<includes> <layoutfunction spacing="KDialog::spacingHint" margin="KDialog::marginHint" />
<include location="local" impldecl="in declaration">kdialog.h</include> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
</includes> <customwidgets>
<customwidget>
</UI> <class>KListBox</class>
<extends>Q3ListBox</extends>
<header>klistbox.h</header>
</customwidget>
</customwidgets>
<includes>
<include location="local" >kdialog.h</include>
</includes>
</ui>

View file

@ -2542,56 +2542,9 @@
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints> <includehints>
<includehint>kcombobox.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint>
<includehint>klistbox.h</includehint> <includehint>klistbox.h</includehint>
<includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kpushbutton.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>krestrictedline.h</includehint> <includehint>krestrictedline.h</includehint>
<includehint>krestrictedline.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>krestrictedline.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>krestrictedline.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>krestrictedline.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>krestrictedline.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>krestrictedline.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
<includehint>kcombobox.h</includehint>
</includehints> </includehints>
</UI> </UI>