Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8823f8c7 authored by Adrian Page's avatar Adrian Page

Fix deprecated and warnings.

svn path=/trunk/koffice/; revision=540822
parent f5e03e0f
......@@ -9,7 +9,7 @@ set(kritamodifyselection_PART_SRCS
kde4_automoc(${kritamodifyselection_PART_SRCS})
kde4_add_ui3_files(kritamodifyselection_PART_SRCS
kde4_add_ui_files(kritamodifyselection_PART_SRCS
wdg_grow_selection.ui
wdg_shrink_selection.ui
wdg_border_selection.ui
......
......@@ -28,7 +28,6 @@ using namespace std;
#include <QRadioButton>
#include <QCheckBox>
#include <q3buttongroup.h>
#include <QLabel>
#include <QComboBox>
......@@ -37,12 +36,13 @@ using namespace std;
#include <kdebug.h>
#include "dlg_border_selection.h"
#include "wdg_border_selection.h"
DlgBorderSelection::DlgBorderSelection( QWidget * parent, const char * name) : super (parent, name, true, i18n("Border Selection"), Ok | Cancel, Ok)
DlgBorderSelection::DlgBorderSelection( QWidget * parent, const char * name) : super (parent, i18n("Border Selection"), Ok | Cancel)
{
m_page = new WdgBorderSelection(this, "border_selection");
setObjectName(name);
m_page = new WdgBorderSelection(this);
Q_CHECK_PTR(m_page);
m_page->setObjectName("border_selection");
setMainWidget(m_page);
resize(m_page->sizeHint());
......
......@@ -20,12 +20,20 @@
#ifndef DLG_BORDER_SELECTION_H
#define DLG_BORDER_SELECTION_H
#include <kdialogbase.h>
#include <kdialog.h>
class WdgBorderSelection;
#include "ui_wdg_border_selection.h"
class DlgBorderSelection: public KDialogBase {
typedef KDialogBase super;
class WdgBorderSelection : public QWidget, public Ui::WdgBorderSelection
{
Q_OBJECT
public:
WdgBorderSelection(QWidget *parent) : QWidget(parent) { setupUi(this); }
};
class DlgBorderSelection: public KDialog {
typedef KDialog super;
Q_OBJECT
public:
......
......@@ -28,7 +28,6 @@ using namespace std;
#include <QRadioButton>
#include <QCheckBox>
#include <q3buttongroup.h>
#include <QLabel>
#include <QComboBox>
......@@ -37,12 +36,13 @@ using namespace std;
#include <kdebug.h>
#include "dlg_grow_selection.h"
#include "wdg_grow_selection.h"
DlgGrowSelection::DlgGrowSelection( QWidget * parent, const char * name) : super (parent, name, true, i18n("Grow Selection"), Ok | Cancel, Ok)
DlgGrowSelection::DlgGrowSelection( QWidget * parent, const char * name) : super (parent, i18n("Grow Selection"), Ok | Cancel)
{
m_page = new WdgGrowSelection(this, "grow_selection");
setObjectName(name);
m_page = new WdgGrowSelection(this);
Q_CHECK_PTR(m_page);
m_page->setObjectName("grow_selection");
setMainWidget(m_page);
resize(m_page->sizeHint());
......
......@@ -20,12 +20,20 @@
#ifndef DLG_GROW_SELECTION_H
#define DLG_GROW_SELECTION_H
#include <kdialogbase.h>
#include <kdialog.h>
class WdgGrowSelection;
#include "ui_wdg_grow_selection.h"
class DlgGrowSelection: public KDialogBase {
typedef KDialogBase super;
class WdgGrowSelection : public QWidget, public Ui::WdgGrowSelection
{
Q_OBJECT
public:
WdgGrowSelection(QWidget *parent) : QWidget(parent) { setupUi(this); }
};
class DlgGrowSelection: public KDialog {
typedef KDialog super;
Q_OBJECT
public:
......
......@@ -28,7 +28,6 @@ using namespace std;
#include <QRadioButton>
#include <QCheckBox>
#include <q3buttongroup.h>
#include <QLabel>
#include <QComboBox>
......@@ -37,12 +36,14 @@ using namespace std;
#include <kdebug.h>
#include "dlg_shrink_selection.h"
#include "wdg_shrink_selection.h"
DlgShrinkSelection::DlgShrinkSelection( QWidget * parent, const char * name) : super (parent, name, true, i18n("Shrink Selection"), Ok | Cancel, Ok)
DlgShrinkSelection::DlgShrinkSelection( QWidget * parent, const char * name) : super (parent, i18n("Shrink Selection"), Ok | Cancel)
{
m_page = new WdgShrinkSelection(this, "shrink_selection");
setObjectName(name);
m_page = new WdgShrinkSelection(this);
Q_CHECK_PTR(m_page);
m_page->setObjectName("shrink_selection");
setMainWidget(m_page);
resize(m_page->sizeHint());
......
......@@ -20,12 +20,20 @@
#ifndef DLG_SHRINK_SELECTION_H
#define DLG_SHRINK_SELECTION_H
#include <kdialogbase.h>
#include <kdialog.h>
class WdgShrinkSelection;
#include "ui_wdg_shrink_selection.h"
class DlgShrinkSelection: public KDialogBase {
typedef KDialogBase super;
class WdgShrinkSelection : public QWidget, public Ui::WdgShrinkSelection
{
Q_OBJECT
public:
WdgShrinkSelection(QWidget *parent) : QWidget(parent) { setupUi(this); }
};
class DlgShrinkSelection: public KDialog {
typedef KDialog super;
Q_OBJECT
public:
......
......@@ -36,16 +36,16 @@
#include <kgenericfactory.h>
#include <kstdaction.h>
#include <kis_doc.h>
#include <kis_config.h>
#include <kis_image.h>
#include <kis_layer.h>
#include <kis_global.h>
#include <kis_types.h>
#include <kis_view.h>
#include <kis_selection.h>
#include <kis_selection_manager.h>
#include <kis_transaction.h>
#include "kis_doc.h"
#include "kis_config.h"
#include "kis_image.h"
#include "kis_layer.h"
#include "kis_global.h"
#include "kis_types.h"
#include "kis_view.h"
#include "kis_selection.h"
#include "kis_selection_manager.h"
#include "kis_transaction.h"
#include "modify_selection.h"
#include "dlg_grow_selection.h"
......@@ -66,14 +66,18 @@ ModifySelection::ModifySelection(QObject *parent, const QStringList &)
m_view = (KisView*) parent;
// Selection manager takes ownership?
KAction* a = new KAction(i18n("Grow selection..."), 0, 0, this, SLOT(slotGrowSelection()), actionCollection(), "growselection");
KAction* b = new KAction(i18n("Shrink selection..."), 0, 0, this, SLOT(slotShrinkSelection()), actionCollection(), "shrinkselection");
KAction* c = new KAction(i18n("Border selection..."), 0, 0, this, SLOT(slotBorderSelection()), actionCollection(), "borderselection");
KAction* a = new KAction(i18n("Grow selection..."), actionCollection(), "growselection");
KAction* b = new KAction(i18n("Shrink selection..."), actionCollection(), "shrinkselection");
KAction* c = new KAction(i18n("Border selection..."), actionCollection(), "borderselection");
Q_CHECK_PTR(a);
Q_CHECK_PTR(b);
Q_CHECK_PTR(c);
connect(a, SIGNAL(triggered()), this, SLOT(slotGrowSelection()));
connect(b, SIGNAL(triggered()), this, SLOT(slotShrinkSelection()));
connect(c, SIGNAL(triggered()), this, SLOT(slotBorderSelection()));
m_view ->canvasSubject()-> selectionManager()->addSelectionAction(a);
m_view ->canvasSubject()-> selectionManager()->addSelectionAction(b);
m_view ->canvasSubject()-> selectionManager()->addSelectionAction(c);
......
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>WdgBorderSelection</class>
<widget class="QWidget">
<property name="name">
<cstring>WdgBorderSelection</cstring>
<ui version="4.0" stdsetdef="1" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>WdgBorderSelection</class>
<widget class="QWidget" name="WdgBorderSelection" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>255</width>
<height>101</height>
</rect>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>255</width>
<height>101</height>
</rect>
<property name="windowTitle" >
<string>WdgBorderSelection</string>
</property>
<property name="caption">
<string>WdgBorderSelection</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Border selection by</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="textLabel1" >
<property name="text" >
<string>Border selection by</string>
</property>
</widget>
<widget class="QSpinBox" row="1" column="0">
<property name="name">
<cstring>radiusSpinBox</cstring>
</property>
<property name="maxValue">
<number>10000</number>
</property>
<property name="minValue">
<number>1</number>
</property>
<property name="value">
<number>1</number>
</property>
</item>
<item row="1" column="0" >
<widget class="QSpinBox" name="radiusSpinBox" >
<property name="maximum" >
<number>10000</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="value" >
<number>1</number>
</property>
</widget>
<widget class="QComboBox" row="1" column="1">
<item>
<property name="text">
<string>pixels</string>
</property>
</item>
<property name="name">
<cstring>comboBox1</cstring>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="comboBox1" >
<item>
<property name="text" >
<string>pixels</string>
</property>
</item>
</widget>
</grid>
</widget>
<tabstops>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<tabstops>
<tabstop>radiusSpinBox</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>
</tabstops>
</ui>
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>WdgGrowSelection</class>
<widget class="QWidget">
<property name="name">
<cstring>WdgGrowSelection</cstring>
<ui version="4.0" stdsetdef="1" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>WdgGrowSelection</class>
<widget class="QWidget" name="WdgGrowSelection" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>255</width>
<height>101</height>
</rect>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>255</width>
<height>101</height>
</rect>
<property name="windowTitle" >
<string>WdgGrowSelection</string>
</property>
<property name="caption">
<string>WdgGrowSelection</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Grow selection by</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QLabel" name="textLabel1" >
<property name="text" >
<string>Grow selection by</string>
</property>
</widget>
<widget class="QSpinBox" row="1" column="0">
<property name="name">
<cstring>radiusSpinBox</cstring>
</property>
<property name="maxValue">
<number>10000</number>
</property>
<property name="minValue">
<number>1</number>
</property>
<property name="value">
<number>1</number>
</property>
</item>
<item row="1" column="0" >
<widget class="QSpinBox" name="radiusSpinBox" >
<property name="maximum" >
<number>10000</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="value" >
<number>1</number>
</property>
</widget>
<widget class="QComboBox" row="1" column="1">
<item>
<property name="text">
<string>pixels</string>
</property>
</item>
<property name="name">
<cstring>comboBox1</cstring>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="comboBox1" >
<item>
<property name="text" >
<string>pixels</string>
</property>
</item>
</widget>
</grid>
</widget>
<tabstops>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<tabstops>
<tabstop>radiusSpinBox</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>
</tabstops>
</ui>
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>WdgShrinkSelection</class>
<widget class="QWidget">
<property name="name">
<cstring>WdgShrinkSelection</cstring>
<ui version="4.0" stdsetdef="1" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>WdgShrinkSelection</class>
<widget class="QWidget" name="WdgShrinkSelection" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>255</width>
<height>117</height>
</rect>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>255</width>
<height>117</height>
</rect>
<property name="windowTitle" >
<string>WdgShrinkSelection</string>
</property>
<property name="caption">
<string>WdgShrinkSelection</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1</cstring>
</property>
<property name="text">
<string>Shrink selection by</string>
</property>
<layout class="QGridLayout" >
<item rowspan="1" row="0" column="0" colspan="2" >
<widget class="QLabel" name="textLabel1" >
<property name="text" >
<string>Shrink selection by</string>
</property>
</widget>
<widget class="QSpinBox" row="1" column="0">
<property name="name">
<cstring>radiusSpinBox</cstring>
</property>
<property name="maxValue">
<number>10000</number>
</property>
<property name="minValue">
<number>1</number>
</property>
<property name="value">
<number>1</number>
</property>
</item>
<item row="1" column="0" >
<widget class="QSpinBox" name="radiusSpinBox" >
<property name="maximum" >
<number>10000</number>
</property>
<property name="minimum" >
<number>1</number>
</property>
<property name="value" >
<number>1</number>
</property>
</widget>
<widget class="QComboBox" row="1" column="1">
<item>
<property name="text">
<string>pixels</string>
</property>
</item>
<property name="name">
<cstring>comboBox1</cstring>
</item>
<item row="1" column="1" >
<widget class="QComboBox" name="comboBox1" >
<item>
<property name="text" >
<string>pixels</string>
</property>
</item>
</widget>
<widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>shrinkFromImageBorderCheckBox</cstring>
</property>
<property name="text">
<string>Shrink from image border</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</item>
<item rowspan="1" row="2" column="0" colspan="2" >
<widget class="QCheckBox" name="shrinkFromImageBorderCheckBox" >
<property name="text" >
<string>Shrink from image border</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</grid>
</widget>
<tabstops>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<tabstops>
<tabstop>radiusSpinBox</tabstop>
</tabstops>
<layoutdefaults spacing="6" margin="11"/>
</UI>
</tabstops>
</ui>
......@@ -9,7 +9,7 @@ set(kritarotateimage_PART_SRCS rotateimage.cc dlg_rotateimage.cc )
kde4_automoc(${kritarotateimage_PART_SRCS})
kde4_add_ui3_files(kritarotateimage_PART_SRCS wdg_rotateimage.ui )
kde4_add_ui_files(kritarotateimage_PART_SRCS wdg_rotateimage.ui )
kde4_add_plugin(kritarotateimage ${kritarotateimage_PART_SRCS})
......
......@@ -26,7 +26,6 @@
using namespace std;
#include <q3groupbox.h>
#include <QRadioButton>
#include <QCheckBox>
#include <QLabel>
......@@ -36,17 +35,18 @@ using namespace std;
#include <kdebug.h>
#include "dlg_rotateimage.h"
#include "wdg_rotateimage.h"
DlgRotateImage::DlgRotateImage( QWidget * parent,
const char * name)
: super (parent, name, true, i18n("Rotate Image"), Ok | Cancel, Ok)
: super (parent, i18n("Rotate Image"), Ok | Cancel)
{
setObjectName(name);
m_lock = false;
m_page = new WdgRotateImage(this, "rotate_image");
m_page = new WdgRotateImage(this);
Q_CHECK_PTR(m_page);
m_page->setObjectName("rotate_image");
setMainWidget(m_page);
resize(m_page->sizeHint());
......
......@@ -20,20 +20,27 @@
#ifndef DLG_ROTATEIMAGE
#define DLG_ROTATEIMAGE
#include <kdialogbase.h>
#include <kdialog.h>
#include <kis_global.h>
#include "kis_global.h"
class WdgRotateImage;
#include "ui_wdg_rotateimage.h"
enum enumRotationDirection {
CLOCKWISE,
COUNTERCLOCKWISE
};
class WdgRotateImage : public QWidget, public Ui::WdgRotateImage
{
Q_OBJECT
public:
WdgRotateImage(QWidget *parent) : QWidget(parent) { setupUi(this); }
};
class DlgRotateImage: public KDialogBase {
typedef KDialogBase super;
class DlgRotateImage: public KDialog {
typedef KDialog super;
Q_OBJECT
public:
......
......@@ -58,16 +58,30 @@ RotateImage::RotateImage(QObject *parent, const QStringList &)
setInstance(RotateImageFactory::instance());
setXMLFile(locate("data","kritaplugins/rotateimage.rc"), true);
m_view = (KisView*) parent;
(void) new KAction(i18n("&Rotate Image..."), 0, 0, this, SLOT(slotRotateImage()), actionCollection(), "rotateimage");
(void) new KAction(i18n("Rotate Image CW"), "rotate_cw", 0, this, SLOT(slotRotateImage90()), actionCollection(), "rotateImageCW90");
(void) new KAction(i18n("Rotate Image 1&80"), 0, 0, this, SLOT(slotRotateImage180()), actionCollection(), "rotateImage180");
(void) new KAction(i18n("Rotate Image CCW"), "rotate_ccw", 0, this, SLOT(slotRotateImage270()), actionCollection(), "rotateImageCCW90");
(void) new KAction(i18n("&Rotate Layer..."), 0, 0, this, SLOT(slotRotateLayer()), actionCollection(), "rotatelayer");
KAction *action = new KAction(i18n("&Rotate Image..."), actionCollection(), "rotateimage");
connect(action, SIGNAL(triggered()), this, SLOT(slotRotateImage()));
(void)new KAction(i18n("Rotate 1&80"), 0, m_view, SLOT(rotateLayer180()), actionCollection(), "rotateLayer180");
(void)new KAction(i18n("Rotate CCW"), "rotate_ccw", 0, m_view, SLOT(rotateLayerLeft90()), actionCollection(), "rotateLayerCCW90");
(void)new KAction(i18n("Rotate CW"), "rotate_cw", 0, m_view, SLOT(rotateLayerRight90()), actionCollection(), "rotateLayerCW90");
action = new KAction(KIcon("rotate_cw"), i18n("Rotate Image CW"), actionCollection(), "rotateImageCW90");
connect(action, SIGNAL(triggered()), this, SLOT(slotRotateImage90()));
action = new KAction(i18n("Rotate Image 1&80"), actionCollection(), "rotateImage180");
connect(action, SIGNAL(triggered()), this, SLOT(slotRotateImage180()));
action = new KAction(KIcon("rotate_ccw"), i18n("Rotate Image CCW"), actionCollection(), "rotateImageCCW90");
connect(action, SIGNAL(triggered()), this, SLOT(slotRotateImage270()));