summaryrefslogtreecommitdiffabout
path: root/kaddressbook/details
Side-by-side diff
Diffstat (limited to 'kaddressbook/details') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp4
-rw-r--r--kaddressbook/details/detailsviewcontainer.h1
-rw-r--r--kaddressbook/details/look_basic.h2
-rw-r--r--kaddressbook/details/look_html.cpp10
-rw-r--r--kaddressbook/details/look_html.h6
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
@@ -69,24 +69,28 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name )
registerLooks();
#if 1
// Hide detailed view selection combo box, because we currently have
// only one. Reenable it when there are more detailed views.
label->hide();
mStyleCombo->hide();
frameRuler->hide();
#endif
}
+void ViewContainer::printView()
+{
+ mCurrentLook->printView();
+}
KABBasicLook *ViewContainer::currentLook()
{
return mCurrentLook;
}
void ViewContainer::registerLooks()
{
mLookFactories.append( new KABHtmlViewFactory( mDetailsStack ) );
// mLookFactories.append( new KABDetailedViewFactory( mDetailsStack ) );
mStyleCombo->clear();
for ( uint i = 0; i < mLookFactories.count(); ++i )
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
@@ -42,24 +42,25 @@ class ViewContainer : public QWidget
Return the look currently selected. If there is none, it
returns zero. Do not use this pointer to store a reference
to a look, the user might select another one (e.g., create
a new object) at any time.
*/
KABBasicLook *currentLook();
/**
Return the contact currently displayed.
*/
KABC::Addressee addressee();
public slots:
+ void printView();
/**
Set the contact currently displayed.
*/
void setAddressee( const KABC::Addressee& addressee );
/**
Set read-write state.
*/
void setReadOnly( bool state );
signals:
/**
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
@@ -66,26 +66,28 @@ class KABBasicLook : public QVBox
*/
virtual void restoreSettings( KConfig* );
/**
Save the view settings to the configuration file.
*/
virtual void saveSettings( KConfig* );
/**
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();
/**
This signal indicates that the entry needs to be changed
immidiately in the database. This might be due to changes in
values that are available in menus.
*/
void saveMe();
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
@@ -17,32 +17,40 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <addresseeview.h>
#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 );
mView->setAddressee( addr );
}
#ifndef KAB_EMBEDDED
#include "look_html.moc"
#endif //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
@@ -20,48 +20,50 @@
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef LOOK_HTML_H
#define LOOK_HTML_H
#include <klocale.h>
#include "look_basic.h"
namespace KABC { class Addressee; }
-namespace KPIM { class AddresseeView; }
+namespace KABC { class AddresseeView; }
class KABHtmlView : public KABBasicLook
{
Q_OBJECT
public:
/**
The constructor.
*/
KABHtmlView( QWidget *parent = 0, const char* name = 0 );
/**
The virtual destructor.
*/
virtual ~KABHtmlView();
/**
Set the addressee.
*/
void setAddressee( const KABC::Addressee& );
+ public slots:
+ void printMe();
private:
- KPIM::AddresseeView *mView;
+ KABC::AddresseeView *mView;
};
class KABHtmlViewFactory : public KABLookFactory
{
public:
KABHtmlViewFactory( QWidget *parent = 0, const char *name = 0 )
: KABLookFactory( parent, name ) {}
KABBasicLook *create()
{
return new KABHtmlView( mParent, mName );
}