summaryrefslogtreecommitdiffabout
path: root/kaddressbook/viewmanager.h
Side-by-side diff
Diffstat (limited to 'kaddressbook/viewmanager.h') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/viewmanager.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kaddressbook/viewmanager.h b/kaddressbook/viewmanager.h
index dff9998..ab5d372 100644
--- a/kaddressbook/viewmanager.h
+++ b/kaddressbook/viewmanager.h
@@ -33,128 +33,129 @@
class KAction;
class KSelectAction;
class KABCore;
class QWidgetStack;
class QDropEvent;
namespace KABC { class AddressBook; }
/**
The view manager manages the views and everything related to them. The
manager will load the views at startup and display a view when told to
make one active.
The view manager will also create and manage all dialogs directly related to
views (ie: AddView, ConfigureView, DeleteView, etc).
*/
class ViewManager : public QWidget
{
Q_OBJECT
public:
ViewManager( KABCore *core, QWidget *parent, const char *name = 0 );
~ViewManager();
void restoreSettings();
void saveSettings();
void doSearch( const QString& s ,KABC::Field *field );
void unloadViews();
KSelectAction * getFilterAction() { return mActionSelectFilter; }
Filter getFilterByName( const QString &name ) const;
QStringList selectedUids() const;
QStringList selectedEmails() const;
KABC::Addressee::List selectedAddressees() const;
void setListSelected(QStringList);
void setFocusAV();
public slots:
void printView() { if (mActiveView) mActiveView->printMyView() ;}
void scrollUP();
void scrollDOWN();
//US void setSelected( const QString &uid = QString::null, bool selected = true );
void setSelected( const QString &uid, bool);
//US added another method with no parameter, since my moc compiler does not support default parameters.
void setSelected();
//US added another method with no parameter, since my moc compiler does not support default parameters.
void refreshView();
void refreshView( const QString &uid);
void editView();
void deleteView();
void addView();
protected slots:
/**
Called whenever the user drops something in the active view.
This method will try to decode what was dropped, and if it was
a valid addressee, add it to the addressbook.
*/
void dropped( QDropEvent* );
/**
Called whenever the user attempts to start a drag in the view.
This method will convert all the selected addressees into text (vcard)
and create a drag object.
*/
void startDrag();
signals:
/**
Emitted whenever the user selects an entry in the view.
*/
void selected( const QString &uid );
void deleteRequest( );
/**
Emitted whenever the user activates an entry in the view.
*/
void executed( const QString &uid );
/**
Emitted whenever the address book is modified in some way.
*/
void modified();
/**
Emitted whenever a url is dragged on a view.
*/
void urlDropped( const KURL& );
private slots:
+ void selectView( const QString &name );
void setActiveView( const QString &name );
void setActiveFilter( int index );
void configureFilters();
private:
void createViewFactories();
QStringList filterNames() const;
int filterPosition( const QString &name ) const;
QStringList viewNames() const;
int viewPosition( const QString &name ) const;
void initActions();
void initGUI();
KABCore *mCore;
Filter mCurrentFilter;
Filter::List mFilterList;
QDict<KAddressBookView> mViewDict;
QDict<ViewFactory> mViewFactoryDict;
QStringList mViewNameList;
QWidgetStack *mViewWidgetStack;
KAddressBookView *mActiveView;
KAction *mActionDeleteView;
KSelectAction *mActionSelectFilter;
KSelectAction *mActionSelectView;
};
#endif