Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tusooa Zhu
Krita
Commits
fc363618
Commit
fc363618
authored
Apr 29, 2006
by
Adrian Page
Browse files
Fix deprecated and warnings.
svn path=/trunk/koffice/; revision=535590
parent
cc5b6862
Changes
40
Hide whitespace changes
Inline
Side-by-side
krita/ui/kis_custom_brush.cc
View file @
fc363618
...
...
@@ -23,7 +23,7 @@
#include
<qpushbutton.h>
#include
<qcombobox.h>
#include
<qcheckbox.h>
//Added by qt3to4:
#include
<QPixmap>
#include
<QShowEvent>
#include
<kglobal.h>
...
...
@@ -47,7 +47,7 @@ KisCustomBrush::KisCustomBrush(QWidget *parent, const char* name, const QString&
{
Q_ASSERT
(
m_view
);
m_mediator
=
0
;
set
Caption
(
caption
);
set
WindowTitle
(
caption
);
m_brush
=
0
;
...
...
@@ -96,7 +96,7 @@ void KisCustomBrush::slotAddPredefined() {
KTempFile
file
(
dir
,
extension
);
file
.
close
();
// If we don't, and brush->save first, it might get truncated!
// Save it to that file
// Save it to that file
m_brush
->
setFilename
(
file
.
name
());
// Add it to the brush server, so that it automatically gets to the mediators, and
...
...
krita/ui/kis_custom_palette.cc
View file @
fc363618
...
...
@@ -46,7 +46,7 @@ KisCustomPalette::KisCustomPalette(QWidget *parent, const char* name, const QStr
m_mediator
=
0
;
m_server
=
0
;
m_editMode
=
false
;
set
Caption
(
caption
);
set
WindowTitle
(
caption
);
m_palette
=
new
KisPalette
();
m_ownPalette
=
true
;
...
...
@@ -128,7 +128,7 @@ void KisCustomPalette::slotAddPredefined() {
KTempFile
file
(
dir
,
extension
);
file
.
close
();
// If we don't, and palette->save first, it might get truncated!
// Save it to that file
// Save it to that file
m_palette
->
setFilename
(
file
.
name
());
}
else
{
// The filename is already set
...
...
krita/ui/kis_input_device.cc
View file @
fc363618
...
...
@@ -29,7 +29,7 @@ KisInputDevice KisInputDevice::Eraser;
KisInputDevice
KisInputDevice
::
Puck
;
KisInputDevice
KisInputDevice
::
Unknown
(
UNKNOWN_INPUT_DEVICE_ID
);
Q
3ValueVector
<
KisInputDevice
>
KisInputDevice
::
InputDevices
;
Q
List
<
KisInputDevice
>
KisInputDevice
::
InputDevices
;
KisInputDevice
::
KisInputDevice
()
{
...
...
@@ -62,7 +62,7 @@ void KisInputDevice::allocateDefaultDevicesIfNeeded()
}
}
Q
3ValueVector
<
KisInputDevice
>
KisInputDevice
::
inputDevices
()
Q
List
<
KisInputDevice
>
KisInputDevice
::
inputDevices
()
{
allocateDefaultDevicesIfNeeded
();
...
...
@@ -93,7 +93,7 @@ KisInputDevice KisInputDevice::puck()
return
Puck
;
}
KisInputDevice
KisInputDevice
::
unknown
()
KisInputDevice
KisInputDevice
::
unknown
()
{
allocateDefaultDevicesIfNeeded
();
return
Unknown
;
...
...
krita/ui/kis_input_device.h
View file @
fc363618
...
...
@@ -19,14 +19,14 @@
#ifndef KIS_INPUT_DEVICE_H_
#define KIS_INPUT_DEVICE_H_
#include
<
q3valuevector.h
>
#include
<
QList
>
class
KisInputDevice
{
public:
KisInputDevice
();
static
KisInputDevice
allocateInputDevice
();
static
Q
3ValueVector
<
KisInputDevice
>
inputDevices
();
static
Q
List
<
KisInputDevice
>
inputDevices
();
friend
inline
bool
operator
==
(
const
KisInputDevice
&
,
const
KisInputDevice
&
);
friend
inline
bool
operator
!=
(
const
KisInputDevice
&
,
const
KisInputDevice
&
);
...
...
@@ -34,11 +34,11 @@ public:
friend
inline
bool
operator
<
(
const
KisInputDevice
&
,
const
KisInputDevice
&
);
friend
inline
bool
operator
>
(
const
KisInputDevice
&
,
const
KisInputDevice
&
);
static
KisInputDevice
mouse
();
// Standard mouse
static
KisInputDevice
stylus
();
// Wacom stylus via QTabletEvent
static
KisInputDevice
eraser
();
// Wacom eraser via QTabletEvent
static
KisInputDevice
puck
();
// Wacom puck via QTabletEvent
static
KisInputDevice
unknown
();
static
KisInputDevice
mouse
();
// Standard mouse
static
KisInputDevice
stylus
();
// Wacom stylus via QTabletEvent
static
KisInputDevice
eraser
();
// Wacom eraser via QTabletEvent
static
KisInputDevice
puck
();
// Wacom puck via QTabletEvent
static
KisInputDevice
unknown
();
private:
KisInputDevice
(
qint32
id
)
:
m_id
(
id
)
{}
...
...
@@ -52,7 +52,7 @@ private:
qint32
m_id
;
static
qint32
NextInputDeviceID
;
static
Q
3ValueVector
<
KisInputDevice
>
InputDevices
;
static
Q
List
<
KisInputDevice
>
InputDevices
;
static
KisInputDevice
Mouse
;
static
KisInputDevice
Stylus
;
...
...
@@ -62,12 +62,12 @@ private:
};
inline
bool
operator
==
(
const
KisInputDevice
&
a
,
const
KisInputDevice
&
b
)
{
return
a
.
id
()
==
b
.
id
();
{
return
a
.
id
()
==
b
.
id
();
}
inline
bool
operator
!=
(
const
KisInputDevice
&
a
,
const
KisInputDevice
&
b
)
{
{
return
a
.
id
()
!=
b
.
id
();
}
...
...
krita/ui/kis_itemchooser.cc
View file @
fc363618
...
...
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include
<q3vbox.h>
#include
<kinstance.h>
#include
<klocale.h>
#include
<kstandarddirs.h>
...
...
@@ -25,8 +25,9 @@
#include
"kis_global.h"
#include
"kis_icon_item.h"
KisItemChooser
::
KisItemChooser
(
QWidget
*
parent
,
const
char
*
name
)
:
super
(
parent
,
name
)
KisItemChooser
::
KisItemChooser
(
QWidget
*
parent
,
const
char
*
name
)
:
super
(
parent
)
{
setObjectName
(
name
);
/* m_frame = new QVBox(this);
m_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken);*/
m_chooser
=
new
KoIconChooser
(
QSize
(
30
,
30
),
this
,
"icon_chooser"
,
true
);
...
...
@@ -66,10 +67,8 @@ void KisItemChooser::addItem(KoIconItem *item)
void
KisItemChooser
::
addItems
(
const
vKoIconItem
&
items
)
{
Q3PtrListIterator
<
KoIconItem
>
itr
(
items
);
for
(
itr
.
toFirst
();
itr
.
current
();
++
itr
)
m_chooser
->
addItem
(
itr
.
current
());
foreach
(
KoIconItem
*
item
,
items
)
m_chooser
->
addItem
(
item
);
}
QWidget
*
KisItemChooser
::
chooserWidget
()
const
...
...
krita/ui/kis_itemchooser.h
View file @
fc363618
...
...
@@ -18,7 +18,7 @@
#ifndef KIS_ITEM_CHOOSER_H_
#define KIS_ITEM_CHOOSER_H_
#include
<
q3ptrl
ist
.h
>
#include
<
QL
ist>
#include
<qwidget.h>
#include
<kvbox.h>
...
...
@@ -27,7 +27,7 @@ class KHBox;
class
KoIconChooser
;
class
KoIconItem
;
typedef
Q
3Ptr
List
<
KoIconItem
>
vKoIconItem
;
typedef
QList
<
KoIconItem
*
>
vKoIconItem
;
class
KisItemChooser
:
public
QWidget
{
typedef
QWidget
super
;
...
...
krita/ui/kis_label_progress.cc
View file @
fc363618
...
...
@@ -21,8 +21,7 @@
#include
<qtoolbutton.h>
#include
<qcursor.h>
#include
<qeventloop.h>
//Added by qt3to4:
#include
<Q3HBoxLayout>
#include
<QHBoxLayout>
#include
<QLabel>
#include
<QKeyEvent>
#include
<QEvent>
...
...
@@ -41,7 +40,7 @@ class EscapeButton : public QToolButton {
public:
EscapeButton
(
QWidget
*
parent
,
const
char
*
name
)
:
QToolButton
(
parent
,
name
)
{};
EscapeButton
(
QWidget
*
parent
,
const
char
*
name
)
:
QToolButton
(
parent
)
{
setObjectName
(
name
)
;
}
void
keyReleaseEvent
(
QKeyEvent
*
e
)
{
...
...
@@ -50,22 +49,24 @@ public:
}
};
KisLabelProgress
::
KisLabelProgress
(
QWidget
*
parent
,
const
char
*
name
,
Qt
::
WFlags
f
)
:
super
(
parent
,
name
,
f
)
KisLabelProgress
::
KisLabelProgress
(
QWidget
*
parent
,
const
char
*
name
)
:
super
(
parent
)
{
setObjectName
(
name
);
m_subject
=
0
;
m_modal
=
false
;
Q3HBoxLayout
*
box
=
new
Q3HBoxLayout
(
this
);
box
->
setAutoAdd
(
true
);
QHBoxLayout
*
box
=
new
QHBoxLayout
(
this
);
QIcon
cancelIconSet
=
SmallIconSet
(
"stop"
);
m_cancelButton
=
new
EscapeButton
(
this
,
"cancel_button"
);
m_cancelButton
->
setIconSet
(
cancelIconSet
);
box
->
addWidget
(
m_cancelButton
);
m_cancelButton
->
setIcon
(
cancelIconSet
);
m_cancelButton
->
setToolTip
(
i18n
(
"Cancel"
));
connect
(
m_cancelButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
cancelPressed
()));
m_bar
=
new
QProgressBar
(
this
);
box
->
addWidget
(
m_bar
);
}
KisLabelProgress
::~
KisLabelProgress
()
...
...
krita/ui/kis_label_progress.h
View file @
fc363618
...
...
@@ -32,7 +32,7 @@ class KisLabelProgress : public QLabel, public KisProgressDisplayInterface {
typedef
QLabel
super
;
public:
KisLabelProgress
(
QWidget
*
parent
,
const
char
*
name
=
0
,
Qt
::
WFlags
f
=
0
);
KisLabelProgress
(
QWidget
*
parent
,
const
char
*
name
=
0
);
virtual
~
KisLabelProgress
();
public:
...
...
krita/ui/kis_label_zoom.h
View file @
fc363618
...
...
@@ -22,11 +22,11 @@
class
KisLabelZoom
:
public
QLabel
{
Q_OBJECT
KisLabelZoom
(
QWidget
*
parent
,
const
char
*
name
=
0
,
Qt
::
WFlags
f
=
0
)
:
QLabel
(
parent
,
name
,
f
)
{
}
KisLabelZoom
(
QWidget
*
parent
,
const
char
*
name
=
0
)
:
QLabel
(
parent
)
{
setObjectName
(
name
);
}
virtual
~
KisLabelZoom
()
{}
};
#endif // KIS_LABEL_ZOOM_H_
...
...
krita/ui/kis_layerbox.cc
View file @
fc363618
...
...
@@ -19,12 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include
<q3button.h>
#include
<qtoolbutton.h>
#include
<qbrush.h>
#include
<qfont.h>
#include
<qfontmetrics.h>
#include
<q3hbox.h>
#include
<qlayout.h>
#include
<qpainter.h>
#include
<qpoint.h>
...
...
@@ -35,10 +33,9 @@
#include
<qwidget.h>
#include
<qcombobox.h>
#include
<qcheckbox.h>
//Added by qt3to4:
#include
<Q3VBoxLayout>
#include
<QVBoxLayout>
#include
<QPixmap>
#include
<Q
3Value
List>
#include
<QList>
#include
<kdebug.h>
#include
<kglobal.h>
...
...
@@ -48,6 +45,7 @@
#include
<kiconloader.h>
#include
<kicontheme.h>
#include
<klocale.h>
#include
<khbox.h>
#include
<KoPartSelectAction.h>
...
...
@@ -66,13 +64,14 @@
#include
"kis_layerbox.h"
KisLayerBox
::
KisLayerBox
(
KisCanvasSubject
*
subject
,
QWidget
*
parent
,
const
char
*
name
)
:
super
(
parent
,
name
),
m_image
(
0
)
:
super
(
parent
),
m_image
(
0
)
{
Q3VBoxLayout
*
vbox
=
new
Q3VBoxLayout
(
this
);
vbox
->
setAutoAdd
(
true
);
setObjectName
(
name
);
QVBoxLayout
*
vbox
=
new
QVBoxLayout
(
this
);
m_lst
=
new
WdgLayerBox
(
this
);
setMinimumSize
(
m_lst
->
minimumSizeHint
());
vbox
->
addWidget
(
m_lst
);
m_lst
->
bnAdd
->
setToolTip
(
i18n
(
"Create new layer"
));
...
...
@@ -122,16 +121,16 @@ KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char
SLOT
(
slotRequestLayerProperties
(
LayerItem
*
)));
m_newLayerMenu
=
new
KMenu
(
this
);
m_lst
->
bnAdd
->
setPopup
(
m_newLayerMenu
);
m_lst
->
bnAdd
->
setPopupDelay
(
1
);
m_newLayerMenu
->
insertItem
(
SmallIconSet
(
"filenew"
),
i18n
(
"&New Layer..."
),
PAINT_LAYER
);
m_newLayerMenu
->
insertItem
(
SmallIconSet
(
"folder"
),
i18n
(
"New &Group Layer..."
),
GROUP_LAYER
);
m_newLayerMenu
->
insertItem
(
SmallIconSet
(
"tool_filter"
),
i18n
(
"New &Adjustment Layer..."
),
ADJUSTMENT_LAYER
);
m_partLayerAction
=
new
KoPartSelectAction
(
i18n
(
"New &Object Layer"
),
"gear"
/*, this - KDE4*/
);
m_partLayerAction
->
plug
(
m_newLayerMenu
);
connect
(
m_partLayerAction
,
SIGNAL
(
activated
()),
this
,
SLOT
(
slotAddMenuActivated
()));
connect
(
m_newLayerMenu
,
SIGNAL
(
activated
(
int
)),
this
,
SLOT
(
slotAddMenuActivated
(
int
)));
m_lst
->
bnAdd
->
setMenu
(
m_newLayerMenu
);
m_lst
->
bnAdd
->
setPopupMode
(
QToolButton
::
InstantPopup
);
m_newLayerMenu
->
addAction
(
SmallIconSet
(
"filenew"
),
i18n
(
"&New Layer..."
),
this
,
SLOT
(
slotNewLayer
()));
m_newLayerMenu
->
addAction
(
SmallIconSet
(
"folder"
),
i18n
(
"New &Group Layer..."
),
this
,
SLOT
(
slotNewGroupLayer
()));
m_newLayerMenu
->
addAction
(
SmallIconSet
(
"tool_filter"
),
i18n
(
"New &Adjustment Layer..."
),
this
,
SLOT
(
slotNewAdjustmentLayer
()));
m_partLayerAction
=
new
KoPartSelectAction
(
i18n
(
"New &Object Layer"
),
"gear"
/*, this - KDE4*/
);
m_newLayerMenu
->
addAction
(
m_partLayerAction
);
connect
(
m_partLayerAction
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
slotNewPartLayer
()));
connect
(
m_lst
->
bnDelete
,
SIGNAL
(
clicked
()),
SLOT
(
slotRmClicked
()));
connect
(
m_lst
->
bnRaise
,
SIGNAL
(
clicked
()),
SLOT
(
slotRaiseClicked
()));
...
...
@@ -226,7 +225,7 @@ void KisLayerBox::slotLayerAdded(KisLayerSP layer)
void
KisLayerBox
::
slotLayerRemoved
(
KisLayerSP
layer
,
KisGroupLayerSP
wasParent
,
KisLayerSP
)
{
list
()
->
removeLayer
(
layer
->
id
());
m_modified
.
remove
(
layer
->
id
());
m_modified
.
remove
All
(
layer
->
id
());
markModified
(
wasParent
.
data
());
updateUI
();
}
...
...
@@ -462,14 +461,9 @@ void KisLayerBox::clear()
updateUI
();
}
void
KisLayerBox
::
slotAddMenuActivated
(
int
typ
e
)
void
KisLayerBox
::
getNewLayerLocation
(
KisGroupLayerSP
&
parent
,
KisLayerSP
&
abov
e
)
{
if
(
type
==
-
1
)
return
;
KisGroupLayerSP
root
=
m_image
->
rootLayer
();
KisGroupLayerSP
parent
;
KisLayerSP
above
;
if
(
KisLayerSP
active
=
m_image
->
activeLayer
())
{
parent
=
root
;
...
...
@@ -482,27 +476,51 @@ void KisLayerBox::slotAddMenuActivated(int type)
parent
=
root
;
above
=
m_image
->
rootLayer
()
->
firstChild
();
}
}
switch
(
type
)
{
case
PAINT_LAYER
:
emit
sigRequestLayer
(
parent
,
above
);
break
;
case
GROUP_LAYER
:
emit
sigRequestGroupLayer
(
parent
,
above
);
break
;
case
ADJUSTMENT_LAYER
:
emit
sigRequestAdjustmentLayer
(
parent
,
above
);
break
;
case
OBJECT_LAYER
:
default:
//goddamned Qt doesn't emit activated for default-assigned IDs, so this does nothing
emit
sigRequestPartLayer
(
parent
,
above
,
m_partLayerAction
->
documentEntry
());
}
void
KisLayerBox
::
slotNewLayer
()
{
KisGroupLayerSP
parent
;
KisLayerSP
above
;
getNewLayerLocation
(
parent
,
above
);
emit
sigRequestLayer
(
parent
,
above
);
}
void
KisLayerBox
::
slotNewGroupLayer
()
{
KisGroupLayerSP
parent
;
KisLayerSP
above
;
getNewLayerLocation
(
parent
,
above
);
emit
sigRequestGroupLayer
(
parent
,
above
);
}
void
KisLayerBox
::
slotNewAdjustmentLayer
()
{
KisGroupLayerSP
parent
;
KisLayerSP
above
;
getNewLayerLocation
(
parent
,
above
);
emit
sigRequestAdjustmentLayer
(
parent
,
above
);
}
void
KisLayerBox
::
slotNewPartLayer
()
{
KisGroupLayerSP
parent
;
KisLayerSP
above
;
getNewLayerLocation
(
parent
,
above
);
emit
sigRequestPartLayer
(
parent
,
above
,
m_partLayerAction
->
documentEntry
());
}
void
KisLayerBox
::
slotRmClicked
()
{
Q
3Value
List
<
int
>
l
=
list
()
->
selectedLayerIDs
();
QList
<
int
>
l
=
list
()
->
selectedLayerIDs
();
if
(
l
.
count
()
<
2
&&
list
()
->
activeLayer
()
&&
!
l
.
contains
(
list
()
->
activeLayer
()
->
id
()))
{
l
.
clear
();
...
...
@@ -511,14 +529,14 @@ void KisLayerBox::slotRmClicked()
for
(
int
i
=
0
,
n
=
l
.
count
();
i
<
n
;
++
i
)
{
m_modified
.
remove
(
l
[
i
]);
m_modified
.
remove
All
(
l
[
i
]);
m_image
->
removeLayer
(
m_image
->
findLayer
(
l
[
i
]));
}
}
void
KisLayerBox
::
slotRaiseClicked
()
{
Q
3Value
List
<
int
>
l
=
list
()
->
selectedLayerIDs
();
QList
<
int
>
l
=
list
()
->
selectedLayerIDs
();
if
(
l
.
count
()
<
2
&&
list
()
->
activeLayer
()
&&
!
l
.
contains
(
list
()
->
activeLayer
()
->
id
()))
{
l
.
clear
();
...
...
@@ -545,7 +563,7 @@ void KisLayerBox::slotRaiseClicked()
void
KisLayerBox
::
slotLowerClicked
()
{
Q
3Value
List
<
LayerItem
*>
l
=
list
()
->
selectedLayers
();
QList
<
LayerItem
*>
l
=
list
()
->
selectedLayers
();
if
(
l
.
count
()
<
2
&&
list
()
->
activeLayer
()
&&
!
l
.
contains
(
list
()
->
activeLayer
()))
{
l
.
clear
();
...
...
@@ -609,7 +627,7 @@ void KisLayerBox::markModified(KisLayer* layer)
if
(
!
layer
)
return
;
Q
3Value
List
<
int
>
v
;
QList
<
int
>
v
;
while
(
layer
&&
layer
!=
m_image
->
rootLayer
().
data
())
{
v
.
append
(
layer
->
id
());
...
...
krita/ui/kis_layerbox.h
View file @
fc363618
...
...
@@ -22,18 +22,17 @@
#ifndef KIS_LAYERBOX_H
#define KIS_LAYERBOX_H
#include
<q3frame.h>
//Added by qt3to4:
#include
<QFrame>
#include
<QPixmap>
#include
<Q3ValueList>
#include
<kdebug.h>
#include
<QList>
#include
<qtimer.h>
#include
<kdebug.h>
#include
"kis_types.h"
#include
"kis_colorspace.h"
class
WdgLayerBox
;
class
Q3Button
;
class
QPainter
;
class
QWidget
;
class
KIconLoader
;
...
...
@@ -44,8 +43,8 @@ class KisLayerList;
class
LayerItem
;
class
KisCanvasSubject
;
class
KisLayerBox
:
public
Q
3
Frame
{
typedef
Q
3
Frame
super
;
class
KisLayerBox
:
public
QFrame
{
typedef
QFrame
super
;
Q_OBJECT
public:
...
...
@@ -98,12 +97,16 @@ private slots:
void
slotRequestLayerProperties
(
LayerItem
*
layer
);
void
slotAboutToShow
();
void
slotAddMenuActivated
(
int
type
=
OBJECT_LAYER
);
void
slotRmClicked
();
void
slotRaiseClicked
();
void
slotLowerClicked
();
void
slotPropertiesClicked
();
void
slotNewLayer
();
void
slotNewGroupLayer
();
void
slotNewAdjustmentLayer
();
void
slotNewPartLayer
();
void
updateThumbnails
();
private:
...
...
@@ -111,11 +114,12 @@ private:
QPixmap
loadPixmap
(
const
QString
&
filename
,
const
KIconLoader
&
il
,
int
size
);
KisLayerList
*
list
()
const
;
void
markModified
(
KisLayer
*
layer
);
void
getNewLayerLocation
(
KisGroupLayerSP
&
parent
,
KisLayerSP
&
above
);
KMenu
*
m_newLayerMenu
;
KoPartSelectAction
*
m_partLayerAction
;
KisImageSP
m_image
;
Q
3Value
List
<
int
>
m_modified
;
QList
<
int
>
m_modified
;
WdgLayerBox
*
m_lst
;
void
printKritaLayers
()
const
;
...
...
krita/ui/kis_layerlist.cc
View file @
fc363618
...
...
@@ -80,7 +80,7 @@ void KisLayerList::constructMenu( LayerItem *layer )
void
KisLayerList
::
menuActivated
(
int
id
,
LayerItem
*
layer
)
{
const
Q
3Value
List
<
LayerItem
*>
selected
=
selectedLayers
();
const
QList
<
LayerItem
*>
selected
=
selectedLayers
();
LayerItem
*
parent
=
(
layer
&&
layer
->
isFolder
()
)
?
layer
:
0
;
LayerItem
*
after
=
0
;
if
(
layer
&&
!
parent
)
...
...
@@ -104,7 +104,7 @@ void KisLayerList::menuActivated( int id, LayerItem *layer )
break
;
case
MenuItems
::
RemoveLayer
:
{
Q
3Value
List
<
int
>
ids
;
QList
<
int
>
ids
;
for
(
int
i
=
0
,
n
=
selected
.
count
();
i
<
n
;
++
i
)
{
ids
.
append
(
selected
[
i
]
->
id
()
);
...
...
krita/ui/kis_multi_bool_filter_widget.cc
View file @
fc363618
...
...
@@ -21,8 +21,7 @@
#include
<qlabel.h>
#include
<qlayout.h>
#include
<qcheckbox.h>
//Added by qt3to4:
#include
<Q3VBoxLayout>
#include
<QVBoxLayout>
#include
<klocale.h>
...
...
@@ -34,24 +33,26 @@ KisBoolWidgetParam::KisBoolWidgetParam( bool ninitvalue, QString nlabel, QStrin
}
KisMultiBoolFilterWidget
::
KisMultiBoolFilterWidget
(
QWidget
*
parent
,
const
char
*
name
,
const
char
*
caption
,
vKisBoolWidgetParam
iwparam
)
:
KisMultiBoolFilterWidget
::
KisMultiBoolFilterWidget
(
QWidget
*
parent
,
const
char
*
name
,
const
char
*
caption
,
vKisBoolWidgetParam
iwparam
)
:
KisFilterConfigWidget
(
parent
,
name
)
{
qint32
m_nbboolWidgets
=
iwparam
.
size
();
this
->
set
Caption
(
caption
);
this
->
set
WindowTitle
(
caption
);
Q3VBoxLayout
*
widgetLayout
=
new
Q3VBoxLayout
(
this
,
m_nbboolWidgets
+
1
);
QVBoxLayout
*
widgetLayout
=
new
QVBoxLayout
(
this
);
widgetLayout
->
setMargin
(
m_nbboolWidgets
+
1
);
m_boolWidgets
=
new
QCheckBox
*
[
m_nbboolWidgets
];
for
(
qint32
i
=
0
;
i
<
m_nbboolWidgets
;
++
i
)
{
m_boolWidgets
[
i
]
=
new
QCheckBox
(
this
,
iwparam
[
i
].
name
.
ascii
());
m_boolWidgets
[
i
]
->
setChecked
(
iwparam
[
i
].
initvalue
);
m_boolWidgets
[
i
]
->
setText
(
iwparam
[
i
].
label
);
m_boolWidgets
[
i
]
=
new
QCheckBox
(
this
);
m_boolWidgets
[
i
]
->
setObjectName
(
iwparam
[
i
].
name
);
m_boolWidgets
[
i
]
->
setChecked
(
iwparam
[
i
].
initvalue
);
m_boolWidgets
[
i
]
->
setText
(
iwparam
[
i
].
label
);
connect
(
m_boolWidgets
[
i
],
SIGNAL
(
toggled
(
bool
)
),
SIGNAL
(
sigPleaseUpdatePreview
()));
widgetLayout
->
add
(
m_boolWidgets
[
i
]);
widgetLayout
->
add
Widget
(
m_boolWidgets
[
i
]);
}
// QSpacerItem * sp = new QSpacerItem(1, 1);
widgetLayout
->
addStretch
();
...
...
@@ -60,9 +61,9 @@ KisMultiBoolFilterWidget::KisMultiBoolFilterWidget(QWidget * parent, const char
void
KisMultiBoolFilterWidget
::
setConfiguration
(
KisFilterConfiguration
*
config
)
{
for
(
int
i
=
0
;
i
<
m_nbboolWidgets
;
++
i
)
{
double
val
=
config
->
getBool
(
m_boolWidgets
[
i
]
->
n
ame
());
double
val
=
config
->
getBool
(
m_boolWidgets
[
i
]
->
objectN
ame
());
m_boolWidgets
[
i
]
->
setChecked
(
val
);
}
}
...
...
krita/ui/kis_multi_double_filter_widget.cc
View file @
fc363618
...
...
@@ -21,25 +21,26 @@
#include
<qlabel.h>
#include
<qlayout.h>
#include
<qtimer.h>
//Added by qt3to4:
#include
<Q3GridLayout>
#include
<QGridLayout>
#include
<knuminput.h>
#include
<kis_filter_config_widget.h>
#include
<klocale.h>
KisDelayedActionDoubleInput
::
KisDelayedActionDoubleInput
(
QWidget
*
parent
,
const
char
*
name
)
KisDelayedActionDoubleInput
::
KisDelayedActionDoubleInput
(
QWidget
*
parent
,
QString
name
)
:
KDoubleNumInput
(
parent
)
{
setObjectName
(
name
);
m_timer
=
new
QTimer
(
this
,
name
);
m_timer
=
new
QTimer
(
this
);