Commit 706133ea authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

use new KPToolDialog API

parent da497b4e
......@@ -68,19 +68,11 @@ void Plugin_Calendar::setup(QWidget* widget)
this, SLOT(slotActivate()));
addAction(m_actionCalendar);
m_interface = dynamic_cast<Interface*>(parent());
if (!m_interface)
{
kError() << "Kipi interface is null!";
return;
}
}
void Plugin_Calendar::slotActivate()
{
CalWizard w(m_interface, kapp->activeWindow());
CalWizard w(kapp->activeWindow());
w.exec();
}
......
......@@ -52,6 +52,7 @@ public:
Plugin_Calendar(QObject* const parent, const QVariantList& args);
~Plugin_Calendar();
virtual Category category(KAction* action) const;
virtual void setup(QWidget* widget);
......@@ -61,9 +62,7 @@ protected Q_SLOTS:
private:
KAction* m_actionCalendar;
Interface* m_interface;
KAction* m_actionCalendar;
};
} // NameSpace KIPICalendarPlugin
......
......@@ -57,16 +57,15 @@
namespace KIPICalendarPlugin
{
CalWizard::CalWizard(Interface* const interface, QWidget* const parent)
: KPWizardDialog(parent),
interface_(interface)
CalWizard::CalWizard(QWidget* const parent)
: KPWizardDialog(parent)
{
setMaximumSize(800, 600);
cSettings_ = CalSettings::instance(this);
// ---------------------------------------------------------------
wTemplate_ = new CalTemplate(interface, this);
wTemplate_ = new CalTemplate(iface(), this);
addPage(wTemplate_, i18n("Create Template for Calendar"));
// ---------------------------------------------------------------
......@@ -136,11 +135,6 @@ CalWizard::~CalWizard()
delete printer_;
}
Interface* CalWizard::interface() const
{
return interface_;
}
void CalWizard::slotPageSelected(KPageWidgetItem* current, KPageWidgetItem* before)
{
Q_UNUSED(before);
......@@ -266,7 +260,7 @@ void CalWizard::print()
printThread_ = new CalPrinter(printer_,
months_,
interface_,
iface(),
this);
connect(printThread_, SIGNAL(pageChanged(int)),
......
......@@ -65,10 +65,8 @@ class CalWizard : public KPWizardDialog
public:
explicit CalWizard(Interface* const interface, QWidget* const parent=0);
explicit CalWizard(QWidget* const parent=0);
virtual ~CalWizard();
Interface* interface() const;
private:
......@@ -99,8 +97,6 @@ private:
CalPrinter* printThread_;
QMap<int, KUrl> months_;
Interface* interface_;
};
} // NameSpace KIPICalendarPlugin
......
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