summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kaddressbookview.h
Side-by-side diff
Diffstat (limited to 'kaddressbook/kaddressbookview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaddressbookview.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h
index 8646136..8f31910 100644
--- a/kaddressbook/kaddressbookview.h
+++ b/kaddressbook/kaddressbookview.h
@@ -17,48 +17,54 @@
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.
*/
#ifndef KADDRESSBOOKVIEW_H
#define KADDRESSBOOKVIEW_H
#ifndef KAB_EMBEDDED
#include <klibloader.h>
#endif //KAB_EMBEDDED
class KConfig;
class QDropEvent;
#include <qstringlist.h>
#include <kabc/field.h>
#include <qwidget.h>
#include "viewconfigurewidget.h"
#include "filter.h"
+#ifdef DESKTOP_VERSION
+#include <qpaintdevicemetrics.h>
+#include <qprinter.h>
+#include <qpainter.h>
+#endif
+
namespace KABC { class AddressBook; }
/**
Base class for all views in kaddressbook. This class implements
all the common methods needed to provide a view to the user.
To implement a specific view (table, card, etc), just inherit from
this class and implement all the pure virtuals.
@author Mike Pilone <mpilone@slac.com>
*/
class KAddressBookView : public QWidget
{
Q_OBJECT
public:
enum DefaultFilterType { None = 0, Active = 1, Specific = 2 };
KAddressBookView( KABC::AddressBook *ab, QWidget *parent, const char *name );
virtual ~KAddressBookView();
/**
Must be overloaded in subclasses. Should return a list of
all the uids of selected contacts.
@@ -129,74 +135,77 @@ class KAddressBookView : public QWidget
Sets the active filter. This filter will be used for filtering
the list of addressees to display. The view will <b>not</b>
automatically refresh itself, so in most cases you will want to call
KAddressBookView::refresh() after this method.
*/
void setFilter( const Filter& );
/**
@return The default filter type selection. If the selection
is SpecificFilter, the name of the filter can be retrieved with
defaultFilterName()
*/
DefaultFilterType defaultFilterType() const;
/**
@return The name of the default filter. This string is
only valid if defaultFilterType() is returning SpecificFilter.
*/
const QString &defaultFilterName() const;
/**
@return The address book.
*/
KABC::AddressBook *addressBook() const;
+ void printMyView() { emit printView() ;}
public slots:
/**
Must be overloaded in subclasses to refresh the view.
Refreshing includes updating the view to ensure that only items
in the document are visible. If <i>uid</i> is valid, only the
addressee with uid needs to be refreshed. This is an optimization
only.
*/
virtual void refresh( QString uid = QString::null ) = 0;
/**
This method must be overloaded in subclasses. Select (highlight)
the addressee matching <i>uid</i>. If uid
is equal to QString::null, then all addressees should be selected.
*/
#ifndef KAB_EMBEDDED
//MOC_SKIP_BEGIN
virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0;
//MOC_SKIP_END
#else //KAB_EMBEDDED
//US my moc can not handle the default parameters. Is this a problem ???
virtual void setSelected( QString uid, bool selected) = 0;
#endif //KAB_EMBEDDED
signals:
+
+ void printView();
/**
This signal should be emitted by a subclass whenever an addressee
is modified.
*/
void modified();
/**
This signal should be emitted by a subclass whenever an addressee
is selected. Selected means that the addressee was given the focus.
Some widgets may call this 'highlighted'. The view is responsible for
emitting this signal multiple times if multiple items are selected,
with the last item selected being the last emit.
@param uid The uid of the selected addressee.
@see KListView
*/
void selected( const QString &uid );
void deleteRequest();
/**
This signal should be emitted by a subclass whenever an addressee
is executed. This is defined by the KDE system wide config, but it
either means single or doubleclicked.