Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Kipi Plugins
Commits
5ff94d45
Commit
5ff94d45
authored
Apr 24, 2012
by
Gilles Caulier
🗼
Browse files
port to KPToolDialog
parent
8bea42cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
rajceexport/rajcewindow.cpp
View file @
5ff94d45
...
...
@@ -29,8 +29,6 @@
// KDE includes
#include
<klocalizedstring.h>
#include
<ktoolinvocation.h>
#include
<khelpmenu.h>
#include
<kmenu.h>
#include
<kpushbutton.h>
...
...
@@ -42,9 +40,9 @@
namespace
KIPIRajceExportPlugin
{
RajceWindow
::
RajceWindow
(
KIPI
::
Interface
*
interface
,
const
QString
&
tmpFolder
,
QWidget
*
/*parent*/
,
Qt
::
WFlags
/*flags*/
)
:
KDialog
(
0
),
m_interface
(
interface
)
RajceWindow
::
RajceWindow
(
Interface
*
const
interface
,
const
QString
&
tmpFolder
,
QWidget
*
const
/*parent*/
,
Qt
::
WFlags
/*flags*/
)
:
K
PTool
Dialog
(
0
),
m_interface
(
interface
)
{
m_widget
=
new
RajceWidget
(
interface
,
tmpFolder
,
this
);
m_widget
->
readSettings
();
...
...
@@ -71,33 +69,24 @@ RajceWindow::RajceWindow(KIPI::Interface* interface, const QString& tmpFolder,
//--------------------------------------------------------------------
m_about
=
new
KIPIPlugins
::
KPAboutData
(
ki18n
(
"Rajce.net Export"
),
0
,
KAboutData
::
License_GPL
,
ki18n
(
"A Kipi plugin to export image collections to "
"Rajce.net."
),
ki18n
(
"(c) 2011, Lukas Krejci"
));
KPAboutData
*
about
=
new
KPAboutData
(
ki18n
(
"Rajce.net Export"
),
0
,
KAboutData
::
License_GPL
,
ki18n
(
"A Kipi plugin to export image collections to "
"Rajce.net."
),
ki18n
(
"(c) 2011, Lukas Krejci"
));
m_
about
->
addAuthor
(
ki18n
(
"Lukas Krejci"
),
ki18n
(
"Author and maintainer"
),
"metlosh at gmail dot com"
);
about
->
addAuthor
(
ki18n
(
"Lukas Krejci"
),
ki18n
(
"Author and maintainer"
),
"metlosh at gmail dot com"
);
disconnect
(
this
,
SIGNAL
(
helpClicked
()),
this
,
SLOT
(
showHelp
())
);
KHelpMenu
*
helpMenu
=
new
KHelpMenu
(
this
,
m_about
,
false
);
helpMenu
->
menu
()
->
removeAction
(
helpMenu
->
menu
()
->
actions
().
first
());
QAction
*
handbook
=
new
QAction
(
i18n
(
"Handbook"
),
this
);
connect
(
handbook
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
showHelp
()));
helpMenu
->
menu
()
->
insertAction
(
helpMenu
->
menu
()
->
actions
().
first
(),
handbook
);
button
(
Help
)
->
setMenu
(
helpMenu
->
menu
());
about
->
handbookEntry
=
QString
(
"rajceexport"
);
setAboutData
(
about
);
button
(
User1
)
->
setEnabled
(
false
);
}
RajceWindow
::~
RajceWindow
()
{
delete
m_about
;
}
void
RajceWindow
::
reactivate
()
...
...
@@ -106,11 +95,6 @@ void RajceWindow::reactivate()
show
();
}
void
RajceWindow
::
showHelp
()
{
KToolInvocation
::
invokeHelp
(
"rajceexport"
,
"kipi-plugins"
);
}
void
RajceWindow
::
slotSetUploadButtonEnabled
(
bool
enabled
)
{
button
(
User1
)
->
setEnabled
(
enabled
);
...
...
rajceexport/rajcewindow.h
View file @
5ff94d45
...
...
@@ -23,46 +23,42 @@
#ifndef RAJCEWINDOW_H
#define RAJCEWINDOW_H
// KDE includes
#include
<kdialog.h>
// Libkipi includes
#include
<libkipi/interface.h>
namespace
KIPIPlugins
{
class
KPAboutData
;
}
// Local includes
#include
"kptooldialog.h"
using
namespace
KIPI
;
using
namespace
KIPIPlugins
;
namespace
KIPIRajceExportPlugin
{
class
RajceWidget
;
class
RajceWindow
:
public
KDialog
class
RajceWindow
:
public
K
PTool
Dialog
{
Q_OBJECT
public:
explicit
RajceWindow
(
KIPI
::
Interface
*
interface
,
const
QString
&
tmpFolder
,
QWidget
*
parent
=
0
,
Qt
::
WFlags
flags
=
0
);
explicit
RajceWindow
(
Interface
*
const
interface
,
const
QString
&
tmpFolder
,
QWidget
*
const
parent
=
0
,
Qt
::
WFlags
flags
=
0
);
~
RajceWindow
();
void
reactivate
();
private
Q_SLOTS
:
void
showHelp
();
void
slotSetUploadButtonEnabled
(
bool
);
void
slotClose
();
private:
KIPI
::
Interface
*
m_interface
;
RajceWidget
*
m_widget
;
KIPIPlugins
::
KPAboutData
*
m_about
;
Interface
*
m_interface
;
RajceWidget
*
m_widget
;
};
}
// namespace KIPIRajceExportPlugin
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment