libtdepim

#include <ksubscription.h>

Inherits KDialogBase.

Public Types

enum  Direction { Left , Right }
 

Public Slots

void slotLoadingComplete ()
 
void slotChangeButtonState (TQListViewItem *)
 
void slotButton1 ()
 
void slotButton2 ()
 
void slotUpdateStatusLabel ()
 
void slotLoadFolders ()
 

Signals

void listChanged ()
 

Public Member Functions

 KSubscription (TQWidget *parent, const TQString &caption, KAccount *acct, int buttons=0, const TQString &user1=TQString(), bool descriptionColumn=true)
 
KAccount * account ()
 
void setAccount (KAccount *acct)
 
TQListView * folderTree ()
 
KLineEdit * searchField ()
 
void setStartItem (const KGroupInfo &info)
 
void removeListItem (TQListView *view, const KGroupInfo &gi)
 
TQListViewItem * getListItem (TQListView *view, const KGroupInfo &gi)
 
bool itemInListView (TQListView *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 (TQListViewItem *item=0, const TQString &text=TQString())
 
uint activeItemCount ()
 
void restoreOriginalParent ()
 
void saveOpenStates ()
 
void restoreOpenStates ()
 

Protected Slots

void slotCBToggled ()
 
void slotFilterTextChanged (const TQString &text)
 

Protected Attributes

KAccount * mAcct
 
TQWidget * page
 
TQListView * groupView
 
TQListView * subView
 
TQListView * unsubView
 
KLineEdit * filterEdit
 
TQCheckBox * noTreeCB
 
TQCheckBox * subCB
 
TQCheckBox * newCB
 
TQPushButton * arrowBtn1
 
TQPushButton * arrowBtn2
 
TQIconSet pmRight
 
TQIconSet pmLeft
 
TQGridLayout * listL
 
TQLabel * leftLabel
 
TQLabel * rightLabel
 
bool mLoading
 
Direction mDirButton1
 
Direction mDirButton2
 
TQString mLastText
 
int mDescrColumn
 

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.

Member Enumeration Documentation

◆ Direction

The direction of the buttons.

Definition at line 197 of file ksubscription.h.

Member Function Documentation

◆ account()

KAccount* KSubscription::account ( )
inline

Get/Set the account.

Definition at line 211 of file ksubscription.h.

◆ activeItemCount()

uint KSubscription::activeItemCount ( )

The amount of items that are visible and enabled.

Definition at line 539 of file ksubscription.cpp.

◆ changeItemState()

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.

◆ directionButton1()

Direction KSubscription::directionButton1 ( )
inline

Get/Set the direction of button1.

Definition at line 254 of file ksubscription.h.

◆ directionButton2()

Direction KSubscription::directionButton2 ( )
inline

Get/Set the direction of button2.

Definition at line 260 of file ksubscription.h.

◆ filterChanged()

void KSubscription::filterChanged ( TQListViewItem *  item = 0,
const TQString &  text = TQString() 
)

Update the item-states (visible, enabled) when a filter criteria changed.

Definition at line 480 of file ksubscription.cpp.

◆ folderTree()

TQListView* KSubscription::folderTree ( )
inline

Access to the treewidget that holds the GroupItems.

Definition at line 217 of file ksubscription.h.

◆ getListItem()

TQListViewItem * KSubscription::getListItem ( TQListView *  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.

◆ hideNewOnlyCheckbox()

void KSubscription::hideNewOnlyCheckbox ( )
inline

Hide 'New Only' checkbox.

Definition at line 277 of file ksubscription.h.

◆ hideTreeCheckbox()

void KSubscription::hideTreeCheckbox ( )
inline

Hide 'Disable tree view' checkbox.

Definition at line 272 of file ksubscription.h.

◆ isLoading()

bool KSubscription::isLoading ( )
inline

Returns true if items are being constructed Call 'slotLoadingComplete' to switch this.

Definition at line 267 of file ksubscription.h.

◆ itemInListView()

bool KSubscription::itemInListView ( TQListView *  view,
const KGroupInfo &  gi 
)

Is the item in the given listview.

Definition at line 404 of file ksubscription.cpp.

◆ listChanged

void KSubscription::listChanged ( )
signal

Emitted when the amount of items in the groupView changes (e.g.

on filtering)

◆ removeListItem()

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

Removes the item from the listview.

Definition at line 372 of file ksubscription.cpp.

◆ restoreOpenStates()

void KSubscription::restoreOpenStates ( )

Restores the saved open state.

Definition at line 593 of file ksubscription.cpp.

◆ restoreOriginalParent()

void KSubscription::restoreOriginalParent ( )

Moves all items from toplevel back to their original position.

Definition at line 555 of file ksubscription.cpp.

◆ saveOpenStates()

void KSubscription::saveOpenStates ( )

Saves the open states.

Definition at line 581 of file ksubscription.cpp.

◆ searchField()

KLineEdit* KSubscription::searchField ( )
inline

Access to the searchfield.

Definition at line 222 of file ksubscription.h.

◆ setStartItem()

void KSubscription::setStartItem ( const KGroupInfo &  info)

The item that should be selected on startup.

Definition at line 357 of file ksubscription.cpp.

◆ slotButton1

void KSubscription::slotButton1 ( )
slot

Buttons are clicked.

Definition at line 672 of file ksubscription.cpp.

◆ slotCBToggled

void KSubscription::slotCBToggled ( )
protectedslot

Slot for the checkboxes.

Definition at line 730 of file ksubscription.cpp.

◆ slotChangeButtonState

void KSubscription::slotChangeButtonState ( TQListViewItem *  item)
slot

Changes the current state of the buttons.

Definition at line 627 of file ksubscription.cpp.

◆ slotFilterTextChanged

void KSubscription::slotFilterTextChanged ( const TQString &  text)
protectedslot

Filter text changed.

Definition at line 742 of file ksubscription.cpp.

◆ slotLoadFolders

void KSubscription::slotLoadFolders ( )
slot

The reload-button is pressed.

Definition at line 784 of file ksubscription.cpp.

◆ slotLoadingComplete

void KSubscription::slotLoadingComplete ( )
slot

Call this slot when you have created all items.

Definition at line 605 of file ksubscription.cpp.

◆ slotUpdateStatusLabel

void KSubscription::slotUpdateStatusLabel ( )
slot

Updates the status-label.

Definition at line 770 of file ksubscription.cpp.


The documentation for this class was generated from the following files: