• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

libkdepim

KPIM::KSubscription

KPIM::KSubscription Class Reference

#include <ksubscription.h>

Inheritance diagram for KPIM::KSubscription:

Inheritance graph
[legend]

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 194 of file ksubscription.h.


Public Types

enum  Direction { Left, Right }

Public Slots

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

Signals

void listChanged ()

Public Member Functions

KAccount * account ()
int activeItemCount ()
void changeItemState (GroupItem *item, bool on)
Direction directionButton1 ()
Direction directionButton2 ()
void filterChanged (Q3ListViewItem *item=0, const QString &text=QString())
Q3ListView * folderTree ()
Q3ListViewItem * getListItem (Q3ListView *view, const KGroupInfo &gi)
void hideNewOnlyCheckbox ()
void hideTreeCheckbox ()
bool isLoading ()
bool itemInListView (Q3ListView *view, const KGroupInfo &gi)
 KSubscription (QWidget *parent, const QString &caption, KAccount *acct, KDialog::ButtonCodes buttons=0, const QString &user1=QString(), bool descriptionColumn=true)
void removeListItem (Q3ListView *view, const KGroupInfo &gi)
void restoreOpenStates ()
void restoreOriginalParent ()
void saveOpenStates ()
KLineEdit * searchField ()
void setAccount (KAccount *acct)
void setDirectionButton1 (Direction dir)
void setDirectionButton2 (Direction dir)
void setStartItem (const KGroupInfo &info)
 ~KSubscription ()

Protected Slots

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

Protected Attributes

QPushButton * arrowBtn1
QPushButton * arrowBtn2
KLineEdit * filterEdit
Q3ListView * groupView
QLabel * leftLabel
QGridLayout * listL
KAccount * mAcct
int mDescrColumn
Direction mDirButton1
Direction mDirButton2
QString mLastText
bool mLoading
QCheckBox * newCB
QCheckBox * noTreeCB
QWidget * page
QIcon pmLeft
QIcon pmRight
QLabel * rightLabel
QCheckBox * subCB
Q3ListView * subView
Q3ListView * unsubView

Member Enumeration Documentation

enum KPIM::KSubscription::Direction

The direction of the buttons.

Enumerator:
Left 
Right 

Definition at line 202 of file ksubscription.h.


Constructor & Destructor Documentation

KSubscription::KSubscription ( QWidget *  parent,
const QString &  caption,
KAccount *  acct,
KDialog::ButtonCodes  buttons = 0,
const QString &  user1 = QString(),
bool  descriptionColumn = true 
)

Definition at line 221 of file ksubscription.cpp.

KSubscription::~KSubscription (  ) 

Definition at line 381 of file ksubscription.cpp.


Member Function Documentation

KAccount* KPIM::KSubscription::account (  )  [inline]

Get/Set the account.

Definition at line 217 of file ksubscription.h.

int KSubscription::activeItemCount (  ) 

The amount of items that are visible and enabled.

Definition at line 567 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 473 of file ksubscription.cpp.

Direction KPIM::KSubscription::directionButton1 (  )  [inline]

Get/Set the direction of button1.

Definition at line 260 of file ksubscription.h.

Direction KPIM::KSubscription::directionButton2 (  )  [inline]

Get/Set the direction of button2.

Definition at line 266 of file ksubscription.h.

void KSubscription::filterChanged ( Q3ListViewItem *  item = 0,
const QString &  text = QString() 
)

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

Definition at line 514 of file ksubscription.cpp.

Q3ListView* KPIM::KSubscription::folderTree (  )  [inline]

Access to the treewidget that holds the GroupItems.

Definition at line 223 of file ksubscription.h.

Q3ListViewItem * KSubscription::getListItem ( Q3ListView *  view,
const KGroupInfo &  gi 
)

Gets the item from the listview Returns 0 if the item can't be found.

Definition at line 418 of file ksubscription.cpp.

void KPIM::KSubscription::hideNewOnlyCheckbox (  )  [inline]

Hide 'New Only' checkbox.

Definition at line 283 of file ksubscription.h.

void KPIM::KSubscription::hideTreeCheckbox (  )  [inline]

Hide 'Disable tree view' checkbox.

Definition at line 278 of file ksubscription.h.

bool KPIM::KSubscription::isLoading (  )  [inline]

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

Definition at line 273 of file ksubscription.h.

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

Is the item in the given listview.

Definition at line 434 of file ksubscription.cpp.

void KPIM::KSubscription::listChanged (  )  [signal]

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

on filtering)

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

Removes the item from the listview.

Definition at line 399 of file ksubscription.cpp.

void KSubscription::restoreOpenStates (  ) 

Restores the saved open state.

Definition at line 616 of file ksubscription.cpp.

void KSubscription::restoreOriginalParent (  ) 

Moves all items from toplevel back to their original position.

Definition at line 583 of file ksubscription.cpp.

void KSubscription::saveOpenStates (  ) 

Saves the open states.

Definition at line 606 of file ksubscription.cpp.

KLineEdit* KPIM::KSubscription::searchField (  )  [inline]

Access to the searchfield.

Definition at line 228 of file ksubscription.h.

void KPIM::KSubscription::setAccount ( KAccount *  acct  )  [inline]

Definition at line 218 of file ksubscription.h.

void KSubscription::setDirectionButton1 ( Direction  dir  ) 

Definition at line 451 of file ksubscription.cpp.

void KSubscription::setDirectionButton2 ( Direction  dir  ) 

Definition at line 462 of file ksubscription.cpp.

void KSubscription::setStartItem ( const KGroupInfo &  info  ) 

The item that should be selected on startup.

Definition at line 386 of file ksubscription.cpp.

void KSubscription::slotButton1 (  )  [slot]

Buttons are clicked.

Definition at line 685 of file ksubscription.cpp.

void KSubscription::slotButton2 (  )  [slot]

Definition at line 709 of file ksubscription.cpp.

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

Slot for the checkboxes.

Definition at line 733 of file ksubscription.cpp.

void KSubscription::slotChangeButtonState ( Q3ListViewItem *  item  )  [slot]

Changes the current state of the buttons.

Definition at line 646 of file ksubscription.cpp.

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

Filter text changed.

Definition at line 744 of file ksubscription.cpp.

void KSubscription::slotLoadFolders (  )  [slot]

The reload-button is pressed.

Definition at line 785 of file ksubscription.cpp.

void KSubscription::slotLoadingComplete (  )  [slot]

Call this slot when you have created all items.

Definition at line 626 of file ksubscription.cpp.

void KSubscription::slotUpdateStatusLabel (  )  [slot]

Updates the status-label.

Definition at line 772 of file ksubscription.cpp.


Member Data Documentation

QPushButton* KPIM::KSubscription::arrowBtn1 [protected]

Definition at line 367 of file ksubscription.h.

QPushButton * KPIM::KSubscription::arrowBtn2 [protected]

Definition at line 367 of file ksubscription.h.

KLineEdit* KPIM::KSubscription::filterEdit [protected]

Definition at line 365 of file ksubscription.h.

Q3ListView* KPIM::KSubscription::groupView [protected]

Definition at line 363 of file ksubscription.h.

QLabel* KPIM::KSubscription::leftLabel [protected]

Definition at line 370 of file ksubscription.h.

QGridLayout* KPIM::KSubscription::listL [protected]

Definition at line 369 of file ksubscription.h.

KAccount* KPIM::KSubscription::mAcct [protected]

Definition at line 359 of file ksubscription.h.

int KPIM::KSubscription::mDescrColumn [protected]

Definition at line 383 of file ksubscription.h.

Direction KPIM::KSubscription::mDirButton1 [protected]

Definition at line 376 of file ksubscription.h.

Direction KPIM::KSubscription::mDirButton2 [protected]

Definition at line 377 of file ksubscription.h.

QString KPIM::KSubscription::mLastText [protected]

Definition at line 380 of file ksubscription.h.

bool KPIM::KSubscription::mLoading [protected]

Definition at line 373 of file ksubscription.h.

QCheckBox * KPIM::KSubscription::newCB [protected]

Definition at line 366 of file ksubscription.h.

QCheckBox* KPIM::KSubscription::noTreeCB [protected]

Definition at line 366 of file ksubscription.h.

QWidget* KPIM::KSubscription::page [protected]

Definition at line 362 of file ksubscription.h.

QIcon KPIM::KSubscription::pmLeft [protected]

Definition at line 368 of file ksubscription.h.

QIcon KPIM::KSubscription::pmRight [protected]

Definition at line 368 of file ksubscription.h.

QLabel * KPIM::KSubscription::rightLabel [protected]

Definition at line 370 of file ksubscription.h.

QCheckBox * KPIM::KSubscription::subCB [protected]

Definition at line 366 of file ksubscription.h.

Q3ListView* KPIM::KSubscription::subView [protected]

Definition at line 364 of file ksubscription.h.

Q3ListView * KPIM::KSubscription::unsubView [protected]

Definition at line 364 of file ksubscription.h.


The documentation for this class was generated from the following files:
  • ksubscription.h
  • ksubscription.cpp

libkdepim

Skip menu "libkdepim"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal