kexi

KFormDesigner::ConnectionDialog Class Reference

#include <connectiondialog.h>

List of all members.


Detailed Description

This dialog is used to edit the connections of a form. It uses KexiTableView for this. There is also a details widget (icon + text)) that shows correctness of current connection.

Definition at line 46 of file connectiondialog.h.


Public Member Functions

 ConnectionDialog (QWidget *parent)
 ~ConnectionDialog ()
void exec (Form *form)

Protected Types

 BAdd = 10
 BRemove
enum  { BAdd = 10, BRemove }

Protected Slots

void slotCellChanged (KexiTableItem *, int, QVariant &, KexiDB::ResultInfo *)
void checkConnection (KexiTableItem *item)
void newItemByDragnDrop ()
void newItem ()
void removeItem ()
void slotConnectionCreated (KFormDesigner::Form *form, KFormDesigner::Connection &connection)
void slotConnectionAborted (KFormDesigner::Form *form)
void slotCellSelected (int col, int row)
void slotRowInserted (KexiTableItem *, bool)
virtual void slotOk ()

Protected Member Functions

void setStatusOk (KexiTableItem *item=0)
void setStatusError (const QString &msg, KexiTableItem *item=0)
void initTable ()
void updateTableData ()
void updateSlotList (KexiTableItem *item)
void updateSignalList (KexiTableItem *item)

Protected Attributes

Formm_form
ConnectionBufferm_buffer
KexiTableViewm_table
KexiTableViewDatam_data
KexiTableViewDatam_widgetsColumnData
KexiTableViewDatam_slotsColumnData
KexiTableViewDatam_signalsColumnData
QLabel * m_pixmapLabel
QLabel * m_textLabel
QIntDict< QButton > m_buttons

Member Function Documentation

void KFormDesigner::ConnectionDialog::checkConnection ( KexiTableItem item  )  [protected, slot]

This function checks if the connection represented by KexiTableItem item is valid. It checks if all args (sender, receiver, signal and slot) are given, and then if signal/slot args are compatible (should be always true, as we don't show non-compatible slots). It calls setStatusOk() or setStatusError() following the result of checks.

Definition at line 330 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::exec ( Form form  ) 

Displays as modal dialog, to edit connections in Form::connectionBuffer().

Definition at line 141 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::initTable (  )  [protected]

Inits table data, columns, etc.

Definition at line 102 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::newItem (  )  [protected, slot]

Creates a new item. It just moves the cursor to the last empty row.

Definition at line 359 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::newItemByDragnDrop (  )  [protected, slot]

Hides the dialog and allow the user to create the Connection by drag-and-drop in the Form itself. Currently disabled in the GUI.

See also:
FormManager::startCreatingConnection()

Definition at line 366 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::setStatusError ( const QString &  msg,
KexiTableItem item = 0 
) [protected]

Used when connection is wrong. Displays a message in details widget and changes icon in 'OK?' column. msg is the message explaining what's wrong.

Definition at line 238 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::setStatusOk ( KexiTableItem item = 0  )  [protected]

Used when connection is ok. Displays a message in details widget and changes icon in 'OK?' column.

Definition at line 219 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::slotCellChanged ( KexiTableItem ,
int  ,
QVariant &  ,
KexiDB::ResultInfo  
) [protected, slot]

Slot called when the user modifies a cell. Signal and/or slot cells are cleared if necessary (not valid anymore).

Definition at line 257 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::slotConnectionAborted ( KFormDesigner::Form form  )  [protected, slot]

This slot is called when the user aborts connection creation (when in drag-and-drop mode). The dialog is restored, and an empty connection is created.

Definition at line 393 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::slotConnectionCreated ( KFormDesigner::Form form,
KFormDesigner::Connection connection 
) [protected, slot]

This slot is called when the user ends connection creation (when in drag-and-drop mode). The dialog is restored, and the created connection is added to the list.

Definition at line 376 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::slotOk (  )  [protected, virtual, slot]

Slot called when the user presses 'Ok' button. The Form::connectionBuffer() is deleted, created again and filled with Connection. If the user presses 'Cancel', nothing happens.

Definition at line 168 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::updateSignalList ( KexiTableItem item  )  [protected]

Updates the signal list, according to the sender name.

Definition at line 311 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::updateSlotList ( KexiTableItem item  )  [protected]

Updates the slot list, according to the receiver name, and only shows those who are compatible with signal args.

Definition at line 277 of file connectiondialog.cpp.

void KFormDesigner::ConnectionDialog::updateTableData (  )  [protected]

Updates the widget list (shown in receiver and sender columns). Then fill in the table with the connections in m_buffer.

Definition at line 190 of file connectiondialog.cpp.


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