Merging from old trunk:

r601561 | mlaurent | 2006-11-03 17:35:38 +0100 (Fri, 03 Nov 2006) | 2 lines

Port to uic4


svn path=/trunk/KDE/kdebase/workspace/; revision=659298
This commit is contained in:
Luboš Luňák 2007-04-29 22:30:07 +00:00
parent 2c539daa5d
commit 9faad7bc5e
7 changed files with 325 additions and 296 deletions

View file

@ -7,7 +7,8 @@ ADD_DEFINITIONS(-DKCMRULES)
########### next target ###############
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})

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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