ViewManager Class Reference
The view manager manages the views and everything related to them. More...
#include <viewmanager.h>
Inheritance diagram for ViewManager:

Public Slots | |
void | readConfig () |
Reads the config file. | |
void | writeConfig () |
Writes the config file. | |
virtual void | sendMail () |
Sends an email to all the selected addressees. | |
void | sendMail (const QString &addressee) |
Open a composer with a message to this person. | |
void | browse (const QString &url) |
Open a browser window displaying the URL given. | |
void | deleteAddressee () |
This slot will delete all the selected entries. | |
void | paste () |
Paste a contact into the addressbook from the clipboard. | |
void | copy () |
Copy a contact from the view into the clipboard. | |
void | cut () |
Cut a contact from the view into the clipboard. | |
void | setSelected (QString uid=QString::null, bool selected=true) |
Selects the given addressee or all addressees if uid == QString::null. | |
void | refresh (QString uid=QString::null) |
Refreshes the active view. | |
void | modifyView () |
Launches the ConfigureView dialog for the active view. | |
void | deleteView () |
Deletes the current view and makes another view active. | |
void | addView () |
Displays the add view dialog. | |
void | filtersChanged (const Filter::List &list) |
Updates the filter list to list. | |
void | filterActivated (int index) |
Called whenever a filter is activated. | |
void | slotModified () |
The resource has been modified and needs to be saved. | |
void | showFeatures (int id) |
Show widget of the feature bar. | |
Signals | |
void | selected (const QString &uid) |
Called whenever the user selects an entry in the view. | |
void | executed (const QString &uid) |
called whenever the user activates an entry in the view. | |
void | modified () |
Emitted whenever the address book is modified in some way. | |
void | viewConfigChanged (const QString &newActive) |
Emitted whenever the view configuration changes. | |
void | setIncSearchFields (const QStringList &) |
Update the IncSearchWidget (in the toolbars) with a new list of fields. | |
void | setFilterNames (const QStringList &) |
Update the select_filter action. | |
void | setCurrentFilterName (const QString &) |
Set the current filter by its name. | |
void | setCurrentFilter (int index) |
Set the current filter. | |
void | importVCard (const QString &, bool) |
Import a VCard that has been dragged. | |
Public Member Functions | |
ViewManager (KABC::AddressBook *doc, KConfig *config, QWidget *parent=0, const char *name=0) | |
void | setActiveView (const QString &name) |
Sets the given view active. | |
void | unloadViews () |
Destroys all the currently loaded views. | |
const QStringList & | viewNames () |
Returns a list of all the defined views. | |
QStringList | selectedUids () |
void | setJumpButtonBarVisible (bool visible) |
Used to enable or disable the jump button bar. | |
void | setDetailsVisible (bool visible) |
Used to enable or disable the details widget. | |
bool | isQuickEditVisible () |
Return if the quick edit currently is shown or not. | |
const Filter::List & | filters () const |
Protected Slots | |
void | incSearch (const QString &text, int field) |
Handle events on the incremental search widget. | |
void | jumpToLetter (const QChar &ch) |
Called whenever the user selects a button from the jump bar. | |
void | dropped (QDropEvent *e) |
Called whenever the user drops something in the active view. | |
void | startDrag () |
Called whenever the user attempts to start a drag in the view. | |
void | addresseeSelected (const QString &uid) |
Called whenever an addressee is selected in the view. | |
void | addresseeModified () |
Called whenever the currently displayed addressee in the details views is modified. |
Detailed Description
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).
Definition at line 60 of file viewmanager.h.
Member Function Documentation
|
Sets the given view active. This usually means raising the view to the top of the widget stack and telling it to refresh. Definition at line 260 of file viewmanager.cpp. References addresseeSelected(), QWidgetStack::addWidget(), ViewWrapper::createView(), dropped(), executed(), QDict< ViewWrapper >::find(), QDict< KAddressBookView >::find(), QDict< KAddressBookView >::insert(), QString::latin1(), modified(), Filter::name(), QWidgetStack::raiseWidget(), KAddressBookView::readConfig(), KAddressBookView::refresh(), selected(), setCurrentFilter(), setCurrentFilterName(), and startDrag(). Referenced by ActionManager::selectViewAction(). |
|
Destroys all the currently loaded views. It is important that after calling this method you call setActiveView before the user has a chance to interact with the gui, since no views will be loaded. Definition at line 254 of file viewmanager.cpp. References QDict< KAddressBookView >::clear(). |
|
Returns a list of all the defined views. This list is guaranteed to always contain at least one view. This list is the 'defined' views, not necessarily the loaded views. However the view will be loaded if it becomes active. Definition at line 87 of file viewmanager.h. Referenced by ActionManager::viewConfigChanged(). |
|
Used to enable or disable the jump button bar.
Definition at line 580 of file viewmanager.cpp. References JumpButtonBar::show(). Referenced by ActionManager::quickToolsAction(). |
|
Used to enable or disable the details widget.
Definition at line 588 of file viewmanager.cpp. Referenced by ActionManager::quickToolsAction(). |
|
Return if the quick edit currently is shown or not.
Definition at line 598 of file viewmanager.cpp. Referenced by KAddressBook::addresseeExecuted(), and KAddressBook::editAddressee(). |
|
Definition at line 110 of file viewmanager.h. Referenced by KAddressBook::configureFilters(). |
|
Reads the config file.
Definition at line 95 of file viewmanager.cpp. References QValueList::append(), QValueList::count(), QDictIterator::current(), QDictIterator::currentKey(), filtersChanged(), QWidget::height(), Filter::restore(), setCurrentFilterName(), QSplitter::setSizes(), QDictIterator::toFirst(), and QWidget::width(). Referenced by KAddressBook::readConfig(). |
|
Writes the config file.
Definition at line 140 of file viewmanager.cpp. References QDictIterator::current(), QDictIterator::currentKey(), Filter::name(), Filter::save(), QSplitter::sizes(), and QDictIterator::toFirst(). Referenced by KAddressBook::writeConfig(). |
|
Sends an email to all the selected addressees. This is done by asking the view for a string of "To:'s" and then asking KDE to open the mailer with the information. Definition at line 167 of file viewmanager.cpp. References KAddressBookView::selectedEmails(). |
|
Open a composer with a message to this person.
Definition at line 173 of file viewmanager.cpp. |
|
Open a browser window displaying the URL given.
Definition at line 178 of file viewmanager.cpp. |
|
This slot will delete all the selected entries. This method should be called just 'delete' to be consistant with the other edit methods, but good 'ol C++ wouldn't like that -mpilone Definition at line 183 of file viewmanager.cpp. References addresseeSelected(), modified(), KAddressBookView::refresh(), selected(), and KAddressBookView::selectedUids(). |
|
Paste a contact into the addressbook from the clipboard.
Definition at line 205 of file viewmanager.cpp. References QApplication::clipboard(), modified(), KAddressBookView::refresh(), and QClipboard::text(). |
|
Copy a contact from the view into the clipboard. This method will copy all selected contacts into the clipboard at once. Definition at line 216 of file viewmanager.cpp. References AddresseeUtil::addresseesToClipboard(), QApplication::clipboard(), KAddressBookView::selectedUids(), and QClipboard::setText(). |
|
Cut a contact from the view into the clipboard. This method will cut all selected contacts into the clpboard at once. Definition at line 234 of file viewmanager.cpp. References modified(), KAddressBookView::refresh(), and KAddressBookView::selectedUids(). |
|
Selects the given addressee or all addressees if uid == QString::null.
Definition at line 249 of file viewmanager.cpp. References KAddressBookView::setSelected(). |
|
Refreshes the active view.
Definition at line 347 of file viewmanager.cpp. References addresseeSelected(), and KAddressBookView::refresh(). Referenced by KAddressBook::addEmail(), KAddressBook::addresseeModified(), KAddressBook::importCSV(), KAddressBook::importKDE2(), KAddressBook::importVCard(), KAddressBook::redo(), and KAddressBook::undo(). |
|
Launches the ConfigureView dialog for the active view.
Definition at line 356 of file viewmanager.cpp. References ViewWrapper::createConfigureViewDialog(), KAddressBookView::defaultFilterName(), KAddressBookView::defaultFilterType(), QDict< ViewWrapper >::find(), Filter::name(), KAddressBookView::readConfig(), ConfigureViewDialog::readConfig(), KAddressBookView::refresh(), Filter::save(), setCurrentFilter(), setCurrentFilterName(), KAddressBookView::type(), and ConfigureViewDialog::writeConfig(). Referenced by addView(). |
|
Deletes the current view and makes another view active.
Definition at line 417 of file viewmanager.cpp. References QWidget::caption(), QDict< KAddressBookView >::remove(), and viewConfigChanged(). |
|
Displays the add view dialog. If the user confirms, the view will be added. Definition at line 441 of file viewmanager.cpp. References QString::latin1(), QString::left(), QString::length(), modifyView(), QString::sprintf(), viewConfigChanged(), AddViewDialog::viewName(), and AddViewDialog::viewType(). |
|
Updates the filter list to list.
Definition at line 697 of file viewmanager.cpp. References QValueList::begin(), QValueList::end(), and setFilterNames(). Referenced by KAddressBook::configureFilters(), and readConfig(). |
|
Called whenever a filter is activated.
Definition at line 711 of file viewmanager.cpp. References KAddressBookView::refresh(), and KAddressBookView::setFilter(). |
|
The resource has been modified and needs to be saved.
Definition at line 727 of file viewmanager.cpp. References modified(). |
|
Show widget of the feature bar.
Definition at line 732 of file viewmanager.cpp. Referenced by ActionManager::quickToolsAction(). |
|
Handle events on the incremental search widget.
Definition at line 566 of file viewmanager.cpp. References KAddressBookView::incrementalSearch(). |
|
Called whenever the user selects a button from the jump bar.
Definition at line 573 of file viewmanager.cpp. References KAddressBookView::incrementalSearch(). |
|
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. Definition at line 603 of file viewmanager.cpp. References QPtrListIterator::current(), QUriDrag::decode(), importVCard(), modified(), KAddressBookView::refresh(), and QStringList::split(). Referenced by setActiveView(). |
|
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. Definition at line 645 of file viewmanager.cpp. References AddresseeUtil::addresseesToClipboard(), and QStringList::join(). Referenced by setActiveView(). |
|
Called whenever an addressee is selected in the view. This method should update the quick edit. The selected() signal will already be emitted, so it does not have to be re-emitted from this method Definition at line 672 of file viewmanager.cpp. Referenced by deleteAddressee(), refresh(), and setActiveView(). |
|
Called whenever the currently displayed addressee in the details views is modified. This method will emit the modified signal and then tell the view to refresh. Definition at line 679 of file viewmanager.cpp. References modified(), and KAddressBookView::refresh(). |
|
Called whenever the user selects an entry in the view.
Referenced by deleteAddressee(), and setActiveView(). |
|
called whenever the user activates an entry in the view.
Referenced by setActiveView(). |
|
Emitted whenever the address book is modified in some way.
Referenced by addresseeModified(), cut(), deleteAddressee(), dropped(), paste(), setActiveView(), and slotModified(). |
|
Emitted whenever the view configuration changes. This can happen if a user adds a new view or removes a view.
Referenced by addView(), and deleteView(). |
|
Update the IncSearchWidget (in the toolbars) with a new list of fields.
|
|
Update the select_filter action.
Referenced by filtersChanged(). |
|
Set the current filter by its name. Ignored if the name does not exist. Referenced by modifyView(), readConfig(), and setActiveView(). |
|
Set the current filter. 0 for none. Referenced by modifyView(), and setActiveView(). |
|
Import a VCard that has been dragged.
Referenced by dropped(). |
The documentation for this class was generated from the following files: