kpilot/kpilot

MemoWidget Class Reference

Inheritance diagram for MemoWidget:

PilotComponent List of all members.

Detailed Description

Definition at line 42 of file memoWidget.h.


Public Types

enum  Constants { MAX_MEMO_LEN = 8192 }

Public Slots

void slotShowMemo (int)
void slotUpdateButtons ()
void slotImportMemo ()
void slotExportMemo ()
void slotDeleteMemo ()
void slotAddMemo ()
void slotSetCategory (int)

Public Member Functions

 MemoWidget (QWidget *parent, const QString &dbpath)
virtual ~MemoWidget ()
void showComponent ()
void hideComponent ()
bool preHotSync (QString &)
void postHotSync ()
bool saveAsXML (const QString &fileName, const QPtrList< PilotListItem > &menu_item)
bool saveAsText (const QString &fileName, const QPtrList< PilotListItem > &menu_item)

Protected Member Functions

void initializeCategories (PilotDatabase *)
void initializeMemos (PilotDatabase *)
void saveChangedMemo ()
bool addMemo (const QString &text, int category)
void showMemo (const PilotMemo *)

Member Function Documentation

void MemoWidget::showComponent (  )  [virtual]

Called when the component is shown in kpilot.

It should load the database and populate the widgets.

Reimplemented from PilotComponent.

Definition at line 164 of file memoWidget.cc.

void MemoWidget::hideComponent (  )  [virtual]

Called when the component is hidden in kpilot.

It should unload the databases and clean up to save memory. This method can be called even if the component is not visible. If there are some editing dlgs open, this needs to be deferred until they are all closed. Then, one can explicitly call hideComponent().

Reimplemented from PilotComponent.

Definition at line 197 of file memoWidget.cc.

bool MemoWidget::preHotSync ( QString &   )  [virtual]

Get ready for a hotsync -- write any unflushed records to disk, close windows, whatever.

Returns false if it is impossible to go into a sync now (due to open windows or strange state.).

The default implementation returns true.

If the function returns false, it can also put a string stating the reason why into s. This string will be displayed to the user: "Can't start HotSync. %1" where 1 is replaced by s.

Reimplemented from PilotComponent.

Definition at line 556 of file memoWidget.cc.

void MemoWidget::postHotSync (  )  [virtual]

Reload data (possibly changed by the hotsync) etc.

etc.

Reimplemented from PilotComponent.

Definition at line 208 of file memoWidget.cc.

void MemoWidget::slotShowMemo ( int   )  [slot]

Called whenever the selected memo changes in order to:

  • display it if necessary
  • update which buttons are active, to prevent the delete button from being active when it can't do anything.

Definition at line 494 of file memoWidget.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys