24 #ifndef KADDRESSBOOKVIEW_H
25 #define KADDRESSBOOKVIEW_H
27 #define KAB_VIEW_PLUGIN_VERSION 1
29 #include <tqstringlist.h>
32 #include <tdeabc/field.h>
33 #include <klibloader.h>
34 #include <tdemacros.h>
37 #include "viewconfigurewidget.h"
44 namespace KAB {
class Core; }
45 namespace TDEABC {
class AddressBook; }
62 enum DefaultFilterType { None = 0, Active = 1, Specific = 2 };
86 virtual void readConfig( TDEConfig *config );
99 virtual void writeConfig( TDEConfig * );
105 virtual TQString selectedEmails();
112 virtual TQString
type()
const = 0;
124 TDEABC::Field::List fields()
const;
132 void setFilter(
const Filter& );
139 DefaultFilterType defaultFilterType()
const;
145 const TQString &defaultFilterName()
const;
150 KAB::Core *core()
const;
157 virtual void scrollUp() = 0;
158 virtual void scrollDown() = 0;
168 virtual void refresh(
const TQString &uid = TQString() ) = 0;
175 virtual void setSelected(
const TQString &uid = TQString(),
bool selected =
true ) = 0;
187 void popup(
const TQPoint &point );
251 TDEABC::Addressee::List addressees();
259 TQWidget *viewWidget();
267 DefaultFilterType mDefaultFilterType;
269 TQString mDefaultFilterName;
271 TDEABC::Field::List mFieldList;
273 TQWidget *mViewWidget;
276 class TDE_EXPORT ViewFactory :
public KLibFactory
280 const char *name = 0 ) = 0;
285 virtual TQString type()
const = 0;
292 virtual TQString description()
const = 0;
305 const char *name = 0 );
308 virtual TQObject* createObject( TQObject*,
const char*,
const char*,
309 const TQStringList & )
Filter for AddressBook related objects (Addressees)
Base class for all views in kaddressbook.
virtual TQStringList selectedUids()=0
Must be overloaded in subclasses.
void startDrag()
This signal is emitted whenever a user attempts to start a drag in the view.
virtual TQString type() const =0
Return the type of the view: Icon, Table, etc.
void viewFieldsChanged()
Emitted whenever the view fields changed.
void dropped(TQDropEvent *)
This signal is emitted whenever the user drops something on the view.
virtual void refresh(const TQString &uid=TQString())=0
Must be overloaded in subclasses to refresh the view.
void selected(const TQString &uid)
This signal should be emitted by a subclass whenever an addressee is selected.
virtual void setSelected(const TQString &uid=TQString(), bool selected=true)=0
This method must be overloaded in subclasses.
void executed(const TQString &uid)
This signal should be emitted by a subclass whenever an addressee is executed.
virtual void setFirstSelected(bool selected=true)=0
Selects the first contact in the view.
void modified()
This signal should be emitted by a subclass whenever an addressee is modified.
void sortFieldChanged()
This signal is emitted whenever the sort field changed.
virtual TDEABC::Field * sortField() const =0