libkdepim
KSubscription Class Reference#include <ksubscription.h>
List of all members.
Detailed Description
This class provides a generic subscription widget The dialog itself has a main listview that holds all items and two listviews that show all changes.
The user can change the state of the items via checkable items. When you construct a new instance you need to provide an account and a caption After inserting your items (checkable or not) you need to call slotLoadingComplete() You should at least connect slots to the signals okClicked() (to save your changes) and user1Clicked() (to reload the list) You can hide unwanted checkboxes via the respective hide<checkboxname> methods
Definition at line 188 of file ksubscription.h.
|
Public Types |
enum | Direction { Left,
Right
} |
Public Slots |
void | slotLoadingComplete () |
void | slotChangeButtonState (QListViewItem *) |
void | slotButton1 () |
void | slotButton2 () |
void | slotUpdateStatusLabel () |
void | slotLoadFolders () |
Signals |
void | listChanged () |
Public Member Functions |
| KSubscription (QWidget *parent, const QString &caption, KAccount *acct, int buttons=0, const QString &user1=QString::null, bool descriptionColumn=true) |
| ~KSubscription () |
KAccount * | account () |
void | setAccount (KAccount *acct) |
QListView * | folderTree () |
KLineEdit * | searchField () |
void | setStartItem (const KGroupInfo &info) |
void | removeListItem (QListView *view, const KGroupInfo &gi) |
QListViewItem * | getListItem (QListView *view, const KGroupInfo &gi) |
bool | itemInListView (QListView *view, const KGroupInfo &gi) |
void | changeItemState (GroupItem *item, bool on) |
Direction | directionButton1 () |
void | setDirectionButton1 (Direction dir) |
Direction | directionButton2 () |
void | setDirectionButton2 (Direction dir) |
bool | isLoading () |
void | hideTreeCheckbox () |
void | hideNewOnlyCheckbox () |
void | filterChanged (QListViewItem *item=0, const QString &text=QString::null) |
uint | activeItemCount () |
void | restoreOriginalParent () |
void | saveOpenStates () |
void | restoreOpenStates () |
Protected Slots |
void | slotCBToggled () |
void | slotFilterTextChanged (const QString &text) |
Protected Attributes |
KAccount * | mAcct |
QWidget * | page |
QListView * | groupView |
QListView * | subView |
QListView * | unsubView |
KLineEdit * | filterEdit |
QCheckBox * | noTreeCB |
QCheckBox * | subCB |
QCheckBox * | newCB |
QPushButton * | arrowBtn1 |
QPushButton * | arrowBtn2 |
QIconSet | pmRight |
QIconSet | pmLeft |
QGridLayout * | listL |
QLabel * | leftLabel |
QLabel * | rightLabel |
bool | mLoading |
Direction | mDirButton1 |
Direction | mDirButton2 |
QString | mLastText |
int | mDescrColumn |
Member Enumeration Documentation
Member Function Documentation
KAccount* KSubscription::account |
( |
|
) |
[inline] |
QListView* KSubscription::folderTree |
( |
|
) |
[inline] |
Access to the treewidget that holds the GroupItems.
Definition at line 216 of file ksubscription.h.
KLineEdit* KSubscription::searchField |
( |
|
) |
[inline] |
void KSubscription::setStartItem |
( |
const KGroupInfo & |
info |
) |
|
void KSubscription::removeListItem |
( |
QListView * |
view, |
|
|
const KGroupInfo & |
gi | |
|
) |
| | |
QListViewItem * KSubscription::getListItem |
( |
QListView * |
view, |
|
|
const KGroupInfo & |
gi | |
|
) |
| | |
Gets the item from the listview Returns 0 if the item can't be found.
Definition at line 390 of file ksubscription.cpp.
bool KSubscription::itemInListView |
( |
QListView * |
view, |
|
|
const KGroupInfo & |
gi | |
|
) |
| | |
void KSubscription::changeItemState |
( |
GroupItem * |
item, |
|
|
bool |
on | |
|
) |
| | |
Makes all changes after an item is toggled called by the item's stateChange-method.
Definition at line 437 of file ksubscription.cpp.
Direction KSubscription::directionButton1 |
( |
|
) |
[inline] |
Direction KSubscription::directionButton2 |
( |
|
) |
[inline] |
bool KSubscription::isLoading |
( |
|
) |
[inline] |
Returns true if items are being constructed Call 'slotLoadingComplete' to switch this.
Definition at line 266 of file ksubscription.h.
void KSubscription::hideTreeCheckbox |
( |
|
) |
[inline] |
void KSubscription::hideNewOnlyCheckbox |
( |
|
) |
[inline] |
void KSubscription::filterChanged |
( |
QListViewItem * |
item = 0 , |
|
|
const QString & |
text = QString::null | |
|
) |
| | |
Update the item-states (visible, enabled) when a filter criteria changed.
Definition at line 480 of file ksubscription.cpp.
uint KSubscription::activeItemCount |
( |
|
) |
|
void KSubscription::restoreOriginalParent |
( |
|
) |
|
Moves all items from toplevel back to their original position.
Definition at line 555 of file ksubscription.cpp.
void KSubscription::saveOpenStates |
( |
|
) |
|
void KSubscription::restoreOpenStates |
( |
|
) |
|
void KSubscription::slotLoadingComplete |
( |
|
) |
[slot] |
void KSubscription::slotChangeButtonState |
( |
QListViewItem * |
|
) |
[slot] |
void KSubscription::slotButton1 |
( |
|
) |
[slot] |
void KSubscription::slotUpdateStatusLabel |
( |
|
) |
[slot] |
void KSubscription::slotLoadFolders |
( |
|
) |
[slot] |
void KSubscription::slotCBToggled |
( |
|
) |
[protected, slot] |
void KSubscription::slotFilterTextChanged |
( |
const QString & |
text |
) |
[protected, slot] |
void KSubscription::listChanged |
( |
|
) |
[signal] |
Emitted when the amount of items in the groupView changes (e.g.
on filtering)
The documentation for this class was generated from the following files:
|