Commit cf38af54 authored by Tobias Koenig's avatar Tobias Koenig

Make the newContact() and newGroup() slot available in the part

svn path=/trunk/KDE/kdepim/kaddressbook/; revision=1025375
parent ec228bf9
...@@ -47,12 +47,22 @@ KAddressBookPart::KAddressBookPart( QWidget *parentWidget, QObject *parent, ...@@ -47,12 +47,22 @@ KAddressBookPart::KAddressBookPart( QWidget *parentWidget, QObject *parent,
setWidget( canvas ); setWidget( canvas );
QVBoxLayout *topLayout = new QVBoxLayout( canvas ); QVBoxLayout *topLayout = new QVBoxLayout( canvas );
MainWidget *mMainWidget = new MainWidget( this, canvas ); mMainWidget = new MainWidget( this, canvas );
topLayout->addWidget( mMainWidget ); topLayout->addWidget( mMainWidget );
topLayout->setMargin(0); topLayout->setMargin(0);
} }
void KAddressBookPart::newContact()
{
mMainWidget->newContact();
}
void KAddressBookPart::newGroup()
{
mMainWidget->newGroup();
}
KAddressBookPart::~KAddressBookPart() KAddressBookPart::~KAddressBookPart()
{ {
} }
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include <kparts/event.h> #include <kparts/event.h>
#include <kparts/part.h> #include <kparts/part.h>
class MainWidget;
class KAddressBookPart: public KParts::ReadOnlyPart class KAddressBookPart: public KParts::ReadOnlyPart
{ {
Q_OBJECT Q_OBJECT
...@@ -32,9 +34,16 @@ class KAddressBookPart: public KParts::ReadOnlyPart ...@@ -32,9 +34,16 @@ class KAddressBookPart: public KParts::ReadOnlyPart
KAddressBookPart( QWidget *parentWidget, QObject *parent, const QVariantList& ); KAddressBookPart( QWidget *parentWidget, QObject *parent, const QVariantList& );
virtual ~KAddressBookPart(); virtual ~KAddressBookPart();
public Q_SLOTS:
void newContact();
void newGroup();
protected: protected:
virtual bool openFile(); virtual bool openFile();
virtual void guiActivateEvent( KParts::GUIActivateEvent* ); virtual void guiActivateEvent( KParts::GUIActivateEvent* );
private:
MainWidget *mMainWidget;
}; };
#endif #endif
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