-rw-r--r-- | kaddressbook/details/detailsviewcontainer.cpp | 4 | ||||
-rw-r--r-- | kaddressbook/details/detailsviewcontainer.h | 1 | ||||
-rw-r--r-- | kaddressbook/details/look_basic.h | 2 | ||||
-rw-r--r-- | kaddressbook/details/look_html.cpp | 10 | ||||
-rw-r--r-- | kaddressbook/details/look_html.h | 8 |
5 files changed, 21 insertions, 4 deletions
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp index 229cce0..cee5886 100644 --- a/kaddressbook/details/detailsviewcontainer.cpp +++ b/kaddressbook/details/detailsviewcontainer.cpp @@ -77,8 +77,12 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) frameRuler->hide(); #endif } +void ViewContainer::printView() +{ + mCurrentLook->printView(); +} KABBasicLook *ViewContainer::currentLook() { return mCurrentLook; } diff --git a/kaddressbook/details/detailsviewcontainer.h b/kaddressbook/details/detailsviewcontainer.h index 667f0cb..9684736 100644 --- a/kaddressbook/details/detailsviewcontainer.h +++ b/kaddressbook/details/detailsviewcontainer.h @@ -50,8 +50,9 @@ class ViewContainer : public QWidget */ KABC::Addressee addressee(); public slots: + void printView(); /** Set the contact currently displayed. */ void setAddressee( const KABC::Addressee& addressee ); diff --git a/kaddressbook/details/look_basic.h b/kaddressbook/details/look_basic.h index 7e8baff..a65c99c 100644 --- a/kaddressbook/details/look_basic.h +++ b/kaddressbook/details/look_basic.h @@ -74,10 +74,12 @@ class KABBasicLook : public QVBox /** Retrieve read-write state. */ bool isReadOnly() const; + void printView(){ emit printMyView();} signals: + void printMyView(); /** This signal is emitted when the user changed the entry. */ void entryChanged(); diff --git a/kaddressbook/details/look_html.cpp b/kaddressbook/details/look_html.cpp index 64987b8..bb30650 100644 --- a/kaddressbook/details/look_html.cpp +++ b/kaddressbook/details/look_html.cpp @@ -25,18 +25,26 @@ #include "look_html.h" #include <qscrollview.h> #include "kabprefs.h" +#include <kabc/addresseeview.h> KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) : KABBasicLook( parent, name ) { - mView = new KPIM::AddresseeView( this ); + mView = new KABC::AddresseeView( this ); mView->setFont( KABPrefs::instance()->mDetailsFont ); + connect(this, SIGNAL(printMyView()), + this , SLOT(printMe())); } KABHtmlView::~KABHtmlView() { } +void KABHtmlView::printMe() +{ + mView->printMe(); + +} void KABHtmlView::setAddressee( const KABC::Addressee &addr ) { mView->setFont( KABPrefs::instance()->mDetailsFont ); diff --git a/kaddressbook/details/look_html.h b/kaddressbook/details/look_html.h index 68a02d9..57eb56f 100644 --- a/kaddressbook/details/look_html.h +++ b/kaddressbook/details/look_html.h @@ -28,9 +28,9 @@ #include "look_basic.h" namespace KABC { class Addressee; } -namespace KPIM { class AddresseeView; } +namespace KABC { class AddresseeView; } class KABHtmlView : public KABBasicLook { Q_OBJECT @@ -48,12 +48,14 @@ class KABHtmlView : public KABBasicLook /** Set the addressee. */ - void setAddressee( const KABC::Addressee& ); + void setAddressee( const KABC::Addressee& ); + public slots: + void printMe(); private: - KPIM::AddresseeView *mView; + KABC::AddresseeView *mView; }; class KABHtmlViewFactory : public KABLookFactory { |