Commit c1d6ea09 authored by Adrian Page's avatar Adrian Page

Fix deprecated and warnings and less Q3.

svn path=/trunk/koffice/; revision=532847
parent 5ed39c10
......@@ -344,7 +344,7 @@ void KisControlFrame::createGradientsChooser(KisView * view)
m_gradientChooser = new KisGradientChooser(m_view, m_gradientChooserPopup, "gradient_chooser");
m_gradientChooser->setFont(m_font);
m_gradientChooser->setMinimumSize(400, 150);
m_gradientChooser->setMinimumSize(200, 150);
m_gradientTab->addTab( m_gradientChooser, i18n("Gradients"));
m_gradientMediator = new KisResourceMediator( m_gradientChooser, view);
......
......@@ -44,9 +44,9 @@
#include "squeezedcombobox.h"
KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent, const char *name)
: super(parent, name, true, "", Ok | Cancel)
: super(parent, "", Ok | Cancel)
{
setObjectName(name);
setCaption(i18n("Image Properties"));
m_page = new WdgNewImage(this);
......@@ -67,9 +67,9 @@ KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent,
//m_page->cmbColorSpaces->hide();
//m_page->lblColorSpaces->setText(image->colorSpace()->id().name());
KisIDList colorSpaces = KisMetaRegistry::instance()->csRegistry()->listKeys();
KisIDList::iterator i = colorSpaces.find(KisID("WET",""));
if (i != colorSpaces.end()) {
colorSpaces.remove(i);
qint32 i = colorSpaces.indexOf(KisID("WET",""));
if (i >= 0) {
colorSpaces.removeAt(i);
}
m_page->cmbColorSpaces->setIDList(colorSpaces);
m_page->cmbColorSpaces->setCurrent(image->colorSpace()->id());
......@@ -77,10 +77,10 @@ KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent,
fillCmbProfiles(image->colorSpace()->id());
if (image->getProfile()) {
m_page->cmbProfile->setCurrentText(image->getProfile()->productName());
m_page->cmbProfile->setCurrentIndexFromText(image->getProfile()->productName());
}
else {
m_page->cmbProfile->setCurrentItem(0);
m_page->cmbProfile->setCurrentIndex(0);
}
m_page->sliderOpacity->setEnabled(false); // XXX re-enable when figured out a way to do this
......@@ -129,7 +129,7 @@ double KisDlgImageProperties::resolution()
QString KisDlgImageProperties::description()
{
return m_page->txtDescription->text();
return m_page->txtDescription->toPlainText();
}
KisColorSpace * KisDlgImageProperties::colorSpace()
......@@ -140,7 +140,7 @@ KisColorSpace * KisDlgImageProperties::colorSpace()
KisProfile * KisDlgImageProperties::profile()
{
Q3ValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( m_image->colorSpace()->id() );
quint32 index = m_page->cmbProfile->currentItem();
qint32 index = m_page->cmbProfile->currentIndex();
if (index < profileList.count()) {
return profileList.at(index);
......@@ -158,10 +158,8 @@ void KisDlgImageProperties::fillCmbProfiles(const KisID & s)
Q3ValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf );
Q3ValueVector<KisProfile *> ::iterator it;
for ( it = profileList.begin(); it != profileList.end(); ++it ) {
m_page->cmbProfile->insertItem((*it)->productName());
m_page->cmbProfile->addSqueezedItem((*it)->productName());
}
}
#include "kis_dlg_image_properties.moc"
......
......@@ -18,12 +18,11 @@
#ifndef KIS_DLG_IMAGE_PROPERTIES_H_
#define KIS_DLG_IMAGE_PROPERTIES_H_
#include <kdialogbase.h>
#include <kdialog.h>
#include <kis_types.h>
#include "ui_wdgnewimage.h"
class Q3ButtonGroup;
class KisID;
class KisColorSpace;
class KisProfile;
......@@ -36,8 +35,8 @@ class WdgNewImage : public QWidget, public Ui::WdgNewImage
WdgNewImage(QWidget *parent) : QWidget(parent) { setupUi(this); }
};
class KisDlgImageProperties : public KDialogBase {
typedef KDialogBase super;
class KisDlgImageProperties : public KDialog {
typedef KDialog super;
Q_OBJECT
public:
......
......@@ -72,13 +72,10 @@
</layout>
</item>
<item row="4" column="0" >
<widget class="Q3GroupBox" name="grpContents" >
<widget class="QGroupBox" name="grpContents" >
<property name="title" >
<string>Contents</string>
</property>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>11</number>
......@@ -87,7 +84,7 @@
<number>6</number>
</property>
<item row="2" column="1" >
<widget class="Q3TextEdit" name="txtDescription" />
<widget class="QTextEdit" name="txtDescription" />
</item>
<item row="0" column="0" >
<widget class="QLabel" name="lblColor" >
......@@ -126,7 +123,7 @@
</widget>
</item>
<item row="1" column="1" >
<widget class="Q3Frame" name="opacityPanel" >
<widget class="QFrame" name="opacityPanel" >
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
</property>
......@@ -186,13 +183,10 @@
</widget>
</item>
<item row="3" column="0" >
<widget class="Q3GroupBox" name="grpMode" >
<widget class="QGroupBox" name="grpMode" >
<property name="title" >
<string>Mode</string>
</property>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>11</number>
......@@ -230,13 +224,10 @@
</widget>
</item>
<item row="2" column="0" >
<widget class="Q3GroupBox" name="grpImage" >
<widget class="QGroupBox" name="grpImage" >
<property name="title" >
<string>&amp;Image Size</string>
</property>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
......@@ -338,13 +329,6 @@
<container>1</container>
<pixmap></pixmap>
</customwidget>
<customwidget>
<class>Q3TextEdit</class>
<extends></extends>
<header>q3textedit.h</header>
<container>0</container>
<pixmap></pixmap>
</customwidget>
<customwidget>
<class>SqueezedComboBox</class>
<extends>QComboBox</extends>
......@@ -366,20 +350,6 @@
<container>1</container>
<pixmap></pixmap>
</customwidget>
<customwidget>
<class>Q3GroupBox</class>
<extends></extends>
<header>Qt3Support/Q3GroupBox</header>
<container>1</container>
<pixmap></pixmap>
</customwidget>
<customwidget>
<class>Q3Frame</class>
<extends></extends>
<header>Qt3Support/Q3Frame</header>
<container>1</container>
<pixmap></pixmap>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>txtName</tabstop>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment