kpilot
AddressWidget Class Reference
#include <addressWidget.h>
Public Types | |
enum | Constants { PhoneNumberLength = 16 } |
Public Slots | |
void | slotCreateNewRecord () |
void | slotDeleteRecord () |
void | slotEditCancelled () |
void | slotEditRecord () |
void | slotExport () |
void | slotShowAddress (int) |
void | slotUpdateButtons () |
Signals | |
void | recordChanged (PilotAddress *) |
Public Member Functions | |
AddressWidget (QWidget *parent, const QString &dbpath) | |
virtual void | hideComponent () |
virtual void | postHotSync () |
virtual bool | preHotSync (QString &) |
virtual void | showComponent () |
~AddressWidget () | |
Protected Slots | |
void | slotAddRecord (PilotAddress *) |
void | slotSetCategory (int) |
void | slotUpdateRecord (PilotAddress *) |
Protected Attributes | |
int | fPendingAddresses |
Detailed Description
Definition at line 44 of file addressWidget.h.
Member Enumeration Documentation
Constructor & Destructor Documentation
Definition at line 68 of file addressWidget.cc.
AddressWidget::~AddressWidget | ( | ) |
Definition at line 81 of file addressWidget.cc.
Member Function Documentation
void AddressWidget::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 161 of file addressWidget.cc.
void AddressWidget::postHotSync | ( | ) | [virtual] |
Reload data (possibly changed by the hotsync) etc.
etc.
Reimplemented from PilotComponent.
Definition at line 200 of file addressWidget.cc.
bool AddressWidget::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 173 of file addressWidget.cc.
void AddressWidget::recordChanged | ( | PilotAddress * | ) | [signal] |
void AddressWidget::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 127 of file addressWidget.cc.
void AddressWidget::slotAddRecord | ( | PilotAddress * | address | ) | [protected, slot] |
void AddressWidget::slotCreateNewRecord | ( | ) | [slot] |
Definition at line 453 of file addressWidget.cc.
void AddressWidget::slotDeleteRecord | ( | ) | [slot] |
Definition at line 556 of file addressWidget.cc.
void AddressWidget::slotEditCancelled | ( | ) | [slot] |
Definition at line 548 of file addressWidget.cc.
void AddressWidget::slotEditRecord | ( | ) | [slot] |
Definition at line 419 of file addressWidget.cc.
void AddressWidget::slotExport | ( | ) | [slot] |
Definition at line 669 of file addressWidget.cc.
void AddressWidget::slotSetCategory | ( | int | ) | [protected, slot] |
Change category.
This means that the display should be cleared and that the list should be repopulated.
Definition at line 412 of file addressWidget.cc.
void AddressWidget::slotShowAddress | ( | int | which | ) | [slot] |
Called when a particular address is selected.
This slot displays it in the viewer widget.
Definition at line 591 of file addressWidget.cc.
void AddressWidget::slotUpdateButtons | ( | ) | [slot] |
Definition at line 401 of file addressWidget.cc.
void AddressWidget::slotUpdateRecord | ( | PilotAddress * | address | ) | [protected, slot] |
When an edit window is closed, the corresponding record is updated and possibly re-displayed.
Definition at line 530 of file addressWidget.cc.
Member Data Documentation
int AddressWidget::fPendingAddresses [protected] |
Keep track of how many open address editing windows there are.
You can't sync when there are open windows.
Definition at line 138 of file addressWidget.h.
The documentation for this class was generated from the following files: