kpilot

MemoWidget Class Reference

#include <memoWidget.h>

Inheritance diagram for MemoWidget:

List of all members.


Public Types

enum  Constants { MAX_MEMO_LEN = 8192 }

Public Slots

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

Public Member Functions

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

Protected Member Functions

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

Detailed Description

Definition at line 42 of file memoWidget.h.


Member Enumeration Documentation

Enumerator:
MAX_MEMO_LEN 

Definition at line 60 of file memoWidget.h.


Constructor & Destructor Documentation

MemoWidget::MemoWidget ( QWidget parent,
const QString dbpath 
)

Definition at line 77 of file memoWidget.cc.

MemoWidget::~MemoWidget (  )  [virtual]

Definition at line 93 of file memoWidget.cc.


Member Function Documentation

bool MemoWidget::addMemo ( const QString text,
int  category 
) [protected]

Definition at line 562 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 196 of file memoWidget.cc.

void MemoWidget::initializeCategories ( PilotDatabase  )  [protected]

void MemoWidget::initializeMemos ( PilotDatabase memoDB  )  [protected]

Definition at line 107 of file memoWidget.cc.

void MemoWidget::postHotSync (  )  [virtual]

Reload data (possibly changed by the hotsync) etc.

etc.

Reimplemented from PilotComponent.

Definition at line 207 of file memoWidget.cc.

bool MemoWidget::preHotSync ( QString s  )  [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 555 of file memoWidget.cc.

bool MemoWidget::saveAsText ( const QString fileName,
const QPtrList< PilotListItem > &  menu_item 
)

Definition at line 674 of file memoWidget.cc.

bool MemoWidget::saveAsXML ( const QString fileName,
const QPtrList< PilotListItem > &  menu_item 
)

Definition at line 706 of file memoWidget.cc.

void MemoWidget::saveChangedMemo (  )  [protected]

Definition at line 533 of file memoWidget.cc.

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::showMemo ( const PilotMemo m  )  [protected]

Definition at line 471 of file memoWidget.cc.

void MemoWidget::slotAddMemo (  )  [slot]

Definition at line 589 of file memoWidget.cc.

void MemoWidget::slotDeleteMemo (  )  [slot]

Definition at line 328 of file memoWidget.cc.

void MemoWidget::slotExportMemo (  )  [slot]

Definition at line 629 of file memoWidget.cc.

void MemoWidget::slotImportMemo (  )  [slot]

Definition at line 597 of file memoWidget.cc.

void MemoWidget::slotSetCategory ( int   )  [slot]

Definition at line 322 of file memoWidget.cc.

void MemoWidget::slotShowMemo ( int  which  )  [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 493 of file memoWidget.cc.

void MemoWidget::slotUpdateButtons (  )  [slot]

Definition at line 294 of file memoWidget.cc.


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