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 ()
KAccountaccount ()
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

KAccountmAcct
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

The direction of the buttons.

Definition at line 196 of file ksubscription.h.


Member Function Documentation

KAccount* KSubscription::account (  )  [inline]

Get/Set the account.

Definition at line 210 of file ksubscription.h.

QListView* KSubscription::folderTree (  )  [inline]

Access to the treewidget that holds the GroupItems.

Definition at line 216 of file ksubscription.h.

KLineEdit* KSubscription::searchField (  )  [inline]

Access to the searchfield.

Definition at line 221 of file ksubscription.h.

void KSubscription::setStartItem ( const KGroupInfo info  ) 

The item that should be selected on startup.

Definition at line 357 of file ksubscription.cpp.

void KSubscription::removeListItem ( QListView *  view,
const KGroupInfo gi 
)

Removes the item from the listview.

Definition at line 372 of file ksubscription.cpp.

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 
)

Is the item in the given listview.

Definition at line 404 of file ksubscription.cpp.

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]

Get/Set the direction of button1.

Definition at line 253 of file ksubscription.h.

Direction KSubscription::directionButton2 (  )  [inline]

Get/Set the direction of button2.

Definition at line 259 of file ksubscription.h.

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]

Hide 'Disable tree view' checkbox.

Definition at line 271 of file ksubscription.h.

void KSubscription::hideNewOnlyCheckbox (  )  [inline]

Hide 'New Only' checkbox.

Definition at line 276 of file ksubscription.h.

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 (  ) 

The amount of items that are visible and enabled.

Definition at line 539 of file ksubscription.cpp.

void KSubscription::restoreOriginalParent (  ) 

Moves all items from toplevel back to their original position.

Definition at line 555 of file ksubscription.cpp.

void KSubscription::saveOpenStates (  ) 

Saves the open states.

Definition at line 581 of file ksubscription.cpp.

void KSubscription::restoreOpenStates (  ) 

Restores the saved open state.

Definition at line 593 of file ksubscription.cpp.

void KSubscription::slotLoadingComplete (  )  [slot]

Call this slot when you have created all items.

Definition at line 605 of file ksubscription.cpp.

void KSubscription::slotChangeButtonState ( QListViewItem *   )  [slot]

Changes the current state of the buttons.

Definition at line 627 of file ksubscription.cpp.

void KSubscription::slotButton1 (  )  [slot]

Buttons are clicked.

Definition at line 672 of file ksubscription.cpp.

void KSubscription::slotUpdateStatusLabel (  )  [slot]

Updates the status-label.

Definition at line 770 of file ksubscription.cpp.

void KSubscription::slotLoadFolders (  )  [slot]

The reload-button is pressed.

Definition at line 784 of file ksubscription.cpp.

void KSubscription::slotCBToggled (  )  [protected, slot]

Slot for the checkboxes.

Definition at line 730 of file ksubscription.cpp.

void KSubscription::slotFilterTextChanged ( const QString &  text  )  [protected, slot]

Filter text changed.

Definition at line 742 of file ksubscription.cpp.

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:
KDE Home | KDE Accessibility Home | Description of Access Keys