author | zautrix <zautrix> | 2005-01-16 22:19:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-16 22:19:12 (UTC) |
commit | 507b362d42d5eed6277ad17422b6ba61acca636e (patch) (unidiff) | |
tree | d3d29451d37649b102c3e171e2927437925f8ce8 /kaddressbook/details | |
parent | a704468d5fd02d30cf962c8b2d6815c7e9208e5d (diff) | |
download | kdepimpi-507b362d42d5eed6277ad17422b6ba61acca636e.zip kdepimpi-507b362d42d5eed6277ad17422b6ba61acca636e.tar.gz kdepimpi-507b362d42d5eed6277ad17422b6ba61acca636e.tar.bz2 |
print AB
-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 | |||
@@ -73,16 +73,20 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) | |||
73 | // Hide detailed view selection combo box, because we currently have | 73 | // Hide detailed view selection combo box, because we currently have |
74 | // only one. Reenable it when there are more detailed views. | 74 | // only one. Reenable it when there are more detailed views. |
75 | label->hide(); | 75 | label->hide(); |
76 | mStyleCombo->hide(); | 76 | mStyleCombo->hide(); |
77 | frameRuler->hide(); | 77 | frameRuler->hide(); |
78 | #endif | 78 | #endif |
79 | } | 79 | } |
80 | 80 | ||
81 | void ViewContainer::printView() | ||
82 | { | ||
83 | mCurrentLook->printView(); | ||
84 | } | ||
81 | KABBasicLook *ViewContainer::currentLook() | 85 | KABBasicLook *ViewContainer::currentLook() |
82 | { | 86 | { |
83 | return mCurrentLook; | 87 | return mCurrentLook; |
84 | } | 88 | } |
85 | 89 | ||
86 | void ViewContainer::registerLooks() | 90 | void ViewContainer::registerLooks() |
87 | { | 91 | { |
88 | mLookFactories.append( new KABHtmlViewFactory( mDetailsStack ) ); | 92 | mLookFactories.append( new KABHtmlViewFactory( mDetailsStack ) ); |
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 | |||
@@ -46,16 +46,17 @@ class ViewContainer : public QWidget | |||
46 | */ | 46 | */ |
47 | KABBasicLook *currentLook(); | 47 | KABBasicLook *currentLook(); |
48 | /** | 48 | /** |
49 | Return the contact currently displayed. | 49 | Return the contact currently displayed. |
50 | */ | 50 | */ |
51 | KABC::Addressee addressee(); | 51 | KABC::Addressee addressee(); |
52 | 52 | ||
53 | public slots: | 53 | public slots: |
54 | void printView(); | ||
54 | /** | 55 | /** |
55 | Set the contact currently displayed. | 56 | Set the contact currently displayed. |
56 | */ | 57 | */ |
57 | void setAddressee( const KABC::Addressee& addressee ); | 58 | void setAddressee( const KABC::Addressee& addressee ); |
58 | 59 | ||
59 | /** | 60 | /** |
60 | Set read-write state. | 61 | Set read-write state. |
61 | */ | 62 | */ |
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 | |||
@@ -70,18 +70,20 @@ class KABBasicLook : public QVBox | |||
70 | Save the view settings to the configuration file. | 70 | Save the view settings to the configuration file. |
71 | */ | 71 | */ |
72 | virtual void saveSettings( KConfig* ); | 72 | virtual void saveSettings( KConfig* ); |
73 | 73 | ||
74 | /** | 74 | /** |
75 | Retrieve read-write state. | 75 | Retrieve read-write state. |
76 | */ | 76 | */ |
77 | bool isReadOnly() const; | 77 | bool isReadOnly() const; |
78 | void printView(){ emit printMyView();} | ||
78 | 79 | ||
79 | signals: | 80 | signals: |
81 | void printMyView(); | ||
80 | /** | 82 | /** |
81 | This signal is emitted when the user changed the entry. | 83 | This signal is emitted when the user changed the entry. |
82 | */ | 84 | */ |
83 | void entryChanged(); | 85 | void entryChanged(); |
84 | 86 | ||
85 | /** | 87 | /** |
86 | This signal indicates that the entry needs to be changed | 88 | This signal indicates that the entry needs to be changed |
87 | immidiately in the database. This might be due to changes in | 89 | immidiately in the database. This might be due to changes in |
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 | |||
@@ -21,26 +21,34 @@ | |||
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <addresseeview.h> | 24 | #include <addresseeview.h> |
25 | 25 | ||
26 | #include "look_html.h" | 26 | #include "look_html.h" |
27 | #include <qscrollview.h> | 27 | #include <qscrollview.h> |
28 | #include "kabprefs.h" | 28 | #include "kabprefs.h" |
29 | #include <kabc/addresseeview.h> | ||
29 | KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) | 30 | KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) |
30 | : KABBasicLook( parent, name ) | 31 | : KABBasicLook( parent, name ) |
31 | { | 32 | { |
32 | mView = new KPIM::AddresseeView( this ); | 33 | mView = new KABC::AddresseeView( this ); |
33 | mView->setFont( KABPrefs::instance()->mDetailsFont ); | 34 | mView->setFont( KABPrefs::instance()->mDetailsFont ); |
35 | connect(this, SIGNAL(printMyView()), | ||
36 | this , SLOT(printMe())); | ||
34 | } | 37 | } |
35 | 38 | ||
36 | KABHtmlView::~KABHtmlView() | 39 | KABHtmlView::~KABHtmlView() |
37 | { | 40 | { |
38 | } | 41 | } |
42 | void KABHtmlView::printMe() | ||
43 | { | ||
44 | mView->printMe(); | ||
45 | |||
46 | } | ||
39 | 47 | ||
40 | void KABHtmlView::setAddressee( const KABC::Addressee &addr ) | 48 | void KABHtmlView::setAddressee( const KABC::Addressee &addr ) |
41 | { | 49 | { |
42 | mView->setFont( KABPrefs::instance()->mDetailsFont ); | 50 | mView->setFont( KABPrefs::instance()->mDetailsFont ); |
43 | mView->setAddressee( addr ); | 51 | mView->setAddressee( addr ); |
44 | } | 52 | } |
45 | 53 | ||
46 | #ifndef KAB_EMBEDDED | 54 | #ifndef KAB_EMBEDDED |
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 | |||
@@ -24,17 +24,17 @@ | |||
24 | #ifndef LOOK_HTML_H | 24 | #ifndef LOOK_HTML_H |
25 | #define LOOK_HTML_H | 25 | #define LOOK_HTML_H |
26 | 26 | ||
27 | #include <klocale.h> | 27 | #include <klocale.h> |
28 | 28 | ||
29 | #include "look_basic.h" | 29 | #include "look_basic.h" |
30 | 30 | ||
31 | namespace KABC { class Addressee; } | 31 | namespace KABC { class Addressee; } |
32 | namespace KPIM { class AddresseeView; } | 32 | namespace KABC { class AddresseeView; } |
33 | 33 | ||
34 | class KABHtmlView : public KABBasicLook | 34 | class KABHtmlView : public KABBasicLook |
35 | { | 35 | { |
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | 37 | ||
38 | public: | 38 | public: |
39 | /** | 39 | /** |
40 | The constructor. | 40 | The constructor. |
@@ -44,20 +44,22 @@ class KABHtmlView : public KABBasicLook | |||
44 | /** | 44 | /** |
45 | The virtual destructor. | 45 | The virtual destructor. |
46 | */ | 46 | */ |
47 | virtual ~KABHtmlView(); | 47 | virtual ~KABHtmlView(); |
48 | 48 | ||
49 | /** | 49 | /** |
50 | Set the addressee. | 50 | Set the addressee. |
51 | */ | 51 | */ |
52 | void setAddressee( const KABC::Addressee& ); | 52 | void setAddressee( const KABC::Addressee& ); |
53 | public slots: | ||
54 | void printMe(); | ||
53 | 55 | ||
54 | private: | 56 | private: |
55 | KPIM::AddresseeView *mView; | 57 | KABC::AddresseeView *mView; |
56 | }; | 58 | }; |
57 | 59 | ||
58 | class KABHtmlViewFactory : public KABLookFactory | 60 | class KABHtmlViewFactory : public KABLookFactory |
59 | { | 61 | { |
60 | public: | 62 | public: |
61 | KABHtmlViewFactory( QWidget *parent = 0, const char *name = 0 ) | 63 | KABHtmlViewFactory( QWidget *parent = 0, const char *name = 0 ) |
62 | : KABLookFactory( parent, name ) {} | 64 | : KABLookFactory( parent, name ) {} |
63 | 65 | ||