-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 | 6 |
5 files changed, 20 insertions, 3 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 @@ -79,4 +79,8 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) } +void ViewContainer::printView() +{ + mCurrentLook->printView(); +} KABBasicLook *ViewContainer::currentLook() { 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 @@ -52,4 +52,5 @@ class ViewContainer : public QWidget public slots: + void printView(); /** Set the contact currently displayed. 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 @@ -76,6 +76,8 @@ class KABBasicLook : public QVBox */ bool isReadOnly() const; + void printView(){ emit printMyView();} signals: + void printMyView(); /** This signal is emitted when the user changed the entry. 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 @@ -27,9 +27,12 @@ #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())); } @@ -37,4 +40,9 @@ KABHtmlView::~KABHtmlView() { } +void KABHtmlView::printMe() +{ + mView->printMe(); + +} void KABHtmlView::setAddressee( const KABC::Addressee &addr ) 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 @@ -30,5 +30,5 @@ namespace KABC { class Addressee; } -namespace KPIM { class AddresseeView; } +namespace KABC { class AddresseeView; } class KABHtmlView : public KABBasicLook @@ -51,7 +51,9 @@ class KABHtmlView : public KABBasicLook */ void setAddressee( const KABC::Addressee& ); + public slots: + void printMe(); private: - KPIM::AddresseeView *mView; + KABC::AddresseeView *mView; }; |