kexi

#include <connectiondialog.h>

Public Member Functions

 ConnectionDialog (TQWidget *parent)
void exec (Form *form)

Protected Types

enum  { BAdd = 10 , BRemove }

Protected Slots

void slotCellChanged (KexiTableItem *, int, TQVariant &, 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 TQString &msg, KexiTableItem *item=0)
void initTable ()
void updateTableData ()
void updateSlotList (KexiTableItem *item)
void updateSignalList (KexiTableItem *item)

Protected Attributes

Form * m_form
ConnectionBuffer * m_buffer
KexiTableView * m_table
KexiTableViewData * m_data
KexiTableViewData * m_widgetsColumnData
KexiTableViewData * m_slotsColumnData
KexiTableViewData * m_signalsColumnData
TQLabel * m_pixmapLabel
TQLabel * m_textLabel
TQIntDict< TQButton > m_buttons

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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Definition at line 103 of file connectiondialog.h.

Constructor & Destructor Documentation

◆ ConnectionDialog()

KFormDesigner::ConnectionDialog::ConnectionDialog ( TQWidget * parent)

Definition at line 48 of file connectiondialog.cpp.

◆ ~ConnectionDialog()

KFormDesigner::ConnectionDialog::~ConnectionDialog ( )
inline

Definition at line 53 of file connectiondialog.h.

Member Function Documentation

◆ checkConnection

void KFormDesigner::ConnectionDialog::checkConnection ( KexiTableItem * item)
protectedslot

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.

◆ exec()

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

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

Definition at line 141 of file connectiondialog.cpp.

◆ initTable()

void KFormDesigner::ConnectionDialog::initTable ( )
protected

Inits table data, columns, etc.

Definition at line 102 of file connectiondialog.cpp.

◆ newItem

void KFormDesigner::ConnectionDialog::newItem ( )
protectedslot

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

Definition at line 359 of file connectiondialog.cpp.

◆ newItemByDragnDrop

void KFormDesigner::ConnectionDialog::newItemByDragnDrop ( )
protectedslot

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.

◆ removeItem

void KFormDesigner::ConnectionDialog::removeItem ( )
protectedslot

Definition at line 403 of file connectiondialog.cpp.

◆ setStatusError()

void KFormDesigner::ConnectionDialog::setStatusError ( const TQString & 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.

◆ setStatusOk()

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.

◆ slotCellChanged

void KFormDesigner::ConnectionDialog::slotCellChanged ( KexiTableItem * item,
int col,
TQVariant & ,
KexiDB::ResultInfo *  )
protectedslot

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.

◆ slotCellSelected

void KFormDesigner::ConnectionDialog::slotCellSelected ( int col,
int row )
protectedslot

Definition at line 149 of file connectiondialog.cpp.

◆ slotConnectionAborted

void KFormDesigner::ConnectionDialog::slotConnectionAborted ( KFormDesigner::Form * form)
protectedslot

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.

◆ slotConnectionCreated

void KFormDesigner::ConnectionDialog::slotConnectionCreated ( KFormDesigner::Form * form,
KFormDesigner::Connection & connection )
protectedslot

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.

◆ slotOk

void KFormDesigner::ConnectionDialog::slotOk ( )
protectedvirtualslot

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.

◆ slotRowInserted

void KFormDesigner::ConnectionDialog::slotRowInserted ( KexiTableItem * item,
bool  )
protectedslot

Definition at line 161 of file connectiondialog.cpp.

◆ updateSignalList()

void KFormDesigner::ConnectionDialog::updateSignalList ( KexiTableItem * item)
protected

Updates the signal list, according to the sender name.

Definition at line 311 of file connectiondialog.cpp.

◆ updateSlotList()

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.

◆ updateTableData()

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.

Member Data Documentation

◆ m_buffer

ConnectionBuffer* KFormDesigner::ConnectionDialog::m_buffer
protected

Definition at line 105 of file connectiondialog.h.

◆ m_buttons

TQIntDict<TQButton> KFormDesigner::ConnectionDialog::m_buttons
protected

Definition at line 110 of file connectiondialog.h.

◆ m_data

KexiTableViewData* KFormDesigner::ConnectionDialog::m_data
protected

Definition at line 107 of file connectiondialog.h.

◆ m_form

Form* KFormDesigner::ConnectionDialog::m_form
protected

Definition at line 104 of file connectiondialog.h.

◆ m_pixmapLabel

TQLabel* KFormDesigner::ConnectionDialog::m_pixmapLabel
protected

Definition at line 109 of file connectiondialog.h.

◆ m_signalsColumnData

KexiTableViewData * KFormDesigner::ConnectionDialog::m_signalsColumnData
protected

Definition at line 108 of file connectiondialog.h.

◆ m_slotsColumnData

KexiTableViewData * KFormDesigner::ConnectionDialog::m_slotsColumnData
protected

Definition at line 108 of file connectiondialog.h.

◆ m_table

KexiTableView* KFormDesigner::ConnectionDialog::m_table
protected

Definition at line 106 of file connectiondialog.h.

◆ m_textLabel

TQLabel * KFormDesigner::ConnectionDialog::m_textLabel
protected

Definition at line 109 of file connectiondialog.h.

◆ m_widgetsColumnData

KexiTableViewData* KFormDesigner::ConnectionDialog::m_widgetsColumnData
protected

Definition at line 108 of file connectiondialog.h.


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