kexi
KFormDesigner::FormManager Class Reference
#include <formmanager.h>
Inheritance diagram for KFormDesigner::FormManager:

Detailed Description
This is Form Designer's main class, which is used by external APIs to access FormDesigner.This is the class you have to use to integrate FormDesigner into another program. It deals with creating, saving and loading Form, as well as widget insertion and copying. It also ensures all the components (ObjectTreeView, Form and PropertyEditor) are synced, and link them. It holds the WidgetLibrary, the WidgetPropertySet, links to ObjectTreeView and PropertyEditor, as well as the copied widget and the insert state.
Definition at line 72 of file formmanager.h.
Public Types | |
enum | Options { HideEventsInPopupMenu = 1, SkipFileActions = 2, HideSignalSlotConnections = 4 } |
Public Slots | |
void | deleteWidget () |
void | copyWidget () |
void | cutWidget () |
void | pasteWidget () |
void | selectAll () |
void | clearWidgetContent () |
void | undo () |
void | redo () |
void | editTabOrder () |
void | adjustWidgetSize () |
void | editFormPixmapCollection () |
void | editConnections () |
void | layoutHBox () |
void | layoutVBox () |
void | layoutGrid () |
void | layoutHSplitter () |
void | layoutVSplitter () |
void | layoutHFlow () |
void | layoutVFlow () |
void | breakLayout () |
void | alignWidgetsToLeft () |
void | alignWidgetsToRight () |
void | alignWidgetsToTop () |
void | alignWidgetsToBottom () |
void | alignWidgetsToGrid () |
void | adjustSizeToGrid () |
void | adjustWidthToSmall () |
void | adjustWidthToBig () |
void | adjustHeightToSmall () |
void | adjustHeightToBig () |
void | bringWidgetToFront () |
void | sendWidgetToBack () |
void | insertWidget (const QCString &classname) |
void | stopInsert () |
void | slotPointerClicked () |
void | startCreatingConnection () |
void | stopCreatingConnection () |
void | windowChanged (QWidget *w) |
void | deleteWidgetLater (QWidget *w) |
void | showFormUICode () |
void | changeFont () |
Signals | |
void | propertySetSwitched (KoProperty::Set *list, bool forceReload=false) |
void | dirty (KFormDesigner::Form *form, bool isDirty=true) |
void | widgetSelected (KFormDesigner::Form *form, bool multiple) |
void | formWidgetSelected (KFormDesigner::Form *form) |
void | noFormSelected () |
void | undoEnabled (bool enabled, const QString &text=QString::null) |
void | redoEnabled (bool enabled, const QString &text=QString::null) |
void | createFormSlot (KFormDesigner::Form *form, const QString &widget, const QString &signal) |
void | connectionCreated (KFormDesigner::Form *form, KFormDesigner::Connection &connection) |
void | connectionAborted (KFormDesigner::Form *form) |
void | autoTabStopsSet (KFormDesigner::Form *form, bool set) |
void | aboutToDeleteForm (KFormDesigner::Form *form) |
void | formCreated (KFormDesigner::Form *form) |
Public Member Functions | |
FormManager (QObject *parent=0, int options=0, const char *name=0) | |
virtual | ~FormManager () |
ActionList | createActions (WidgetLibrary *lib, KActionCollection *parent) |
virtual void | enableAction (const char *name, bool enable)=0 |
virtual KAction * | action (const char *name)=0 |
bool | isPasteEnabled () |
WidgetPropertySet * | propertySet () const |
bool | isInserting () const |
QCString | selectedClass () const |
void | setInsertPoint (const QPoint &p) |
bool | isCreatingConnection () |
Connection * | createdConnection () |
void | resetCreatedConnection () |
void | createSignalMenu (QWidget *w) |
void | createSlotMenu (QWidget *w) |
void | emitCreateSlot (const QString &widget, const QString &value) |
Form * | activeForm () const |
Form * | formForWidget (QWidget *w) |
bool | isTopLevel (QWidget *w) |
KoProperty::Editor * | propertyEditor () const |
virtual void | showPropertySet (WidgetPropertySet *list, bool forceReload=false) |
void | blockPropertyEditorUpdating (void *blockingObject) |
void | unblockPropertyEditorUpdating (void *blockingObject, WidgetPropertySet *propSet) |
void | setEditor (KoProperty::Editor *editor) |
void | setObjectTreeView (ObjectTreeView *treeview) |
void | previewForm (Form *form, QWidget *w, Form *toForm=0) |
void | importForm (Form *form=0, bool preview=false) |
void | deleteForm (Form *form) |
void | createContextMenu (QWidget *w, Container *container, bool popupAtCursor=true) |
bool | snapWidgetsToGrid () |
int | contextMenuKey () const |
void | emitWidgetSelected (KFormDesigner::Form *form, bool multiple) |
void | emitFormWidgetSelected (KFormDesigner::Form *form) |
void | emitNoFormSelected () |
bool | isRedoing () const |
Static Public Member Functions | |
static WidgetLibrary * | createWidgetLibrary (FormManager *m, const QStringList &supportedFactoryGroups) |
static FormManager * | self () |
Protected Slots | |
void | deleteWidgetLaterTimeout () |
void | buddyChoosed (int id) |
void | menuSignalChoosed (int id) |
void | slotStyle () |
void | slotConnectionCreated (KFormDesigner::Form *, KFormDesigner::Connection &) |
void | slotSettingsChanged (int category) |
Protected Member Functions | |
void | initForm (Form *form) |
void | createLayout (int layoutType) |
void | alignWidgets (int type) |
void | enableFormActions () |
void | disableWidgetActions () |
void | emitUndoEnabled (bool enabled, const QString &text) |
void | emitRedoEnabled (bool enabled, const QString &text) |
Friends | |
class | PropertyCommand |
class | GeometryPropertyCommand |
class | CutWidgetCommand |
class | Form |
Member Enumeration Documentation
|
Options for creating FormManager objects. These are really bit-flags and may be or-ed together. Definition at line 94 of file formmanager.h. |
Constructor & Destructor Documentation
|
Constructs FormManager object. Using options you can control manager's behaviour, see Options. Definition at line 108 of file formmanager.cpp. |
Member Function Documentation
|
Signal emitted before the form gets finally deleted. form is still a valid pointer, but the widgets inside the form are in unknown state. |
|
Implemented in KexiFormManager. |
|
Definition at line 574 of file formmanager.cpp. |
|
Resize all selected widgets to the height of the tallest widget.
Definition at line 1338 of file formmanager.cpp. |
|
Resize all selected widgets to the height of the shortest widget.
Definition at line 1328 of file formmanager.cpp. |
|
Adjusts the size of the selected widget, ie resize it to its size hint. Definition at line 1278 of file formmanager.cpp. |
|
Resize all selected widgets to the width of the widest widget.
Definition at line 1318 of file formmanager.cpp. |
|
Resize all selected widgets to the width of the narrowest widget.
Definition at line 1308 of file formmanager.cpp. |
|
Function called by all other AlignWidgets*() function. Calls AlignWidgetsCommand. Definition at line 1233 of file formmanager.cpp. |
|
Signal emitted when "autoTabStops" is changed. |
|
Breaks selected layout(calls BreakLayoutCommand).
Definition at line 1125 of file formmanager.cpp. |
|
Slot called when a buddy is choosed in the buddy list. Sets the label buddy. Definition at line 992 of file formmanager.cpp. |
|
Executes font dialog and changes it for currently selected widget(s). Definition at line 1645 of file formmanager.cpp. |
|
Clears the contents of the selected widget(s) (eg for a line edit or a listview). Definition at line 1379 of file formmanager.cpp. |
|
Signal emitted when the Connection creation by drag-and-drop is aborted by user. |
|
Signal emitted when the Connection creation by drag-and-drop ends. connection is the created Connection. You should copy it, because it is deleted just after the signal is emitted. |
|
Copies the slected widget and all its children of the active Form using an XML representation. Definition at line 719 of file formmanager.cpp. |
|
Creates all the KAction related to widget insertion, and plug them into the KActionCollection parent. These actions are automatically connected to insertWidget() slot.
Definition at line 195 of file formmanager.cpp. |
|
This function creates and displays the context menu corresponding to the widget w. The menu item are disabled if necessary, and the widget specific part is added (menu from the factory and buddy selection). Definition at line 835 of file formmanager.cpp. |
|
Definition at line 135 of file formmanager.h. |
|
Signal emitted when the user choose a signal in 'Events' menu in context menu, or in 'Events' in property editor. The code editor should then create the slot connected to this signal. |
|
Function called by the "Lay out in..." menu items. It creates a layout from the currently selected widgets (that must have the same parent). Calls CreateLayoutCommand. Definition at line 1090 of file formmanager.cpp. |
|
Creates and display a menu with all the signals of widget w.
Definition at line 783 of file formmanager.cpp. |
|
Creates and display a menu with all the slots of widget w.
Definition at line 804 of file formmanager.cpp. |
|
Creates widget library for supportedFactoryGroups and initializes FormManager singleton. m should be always the same for every call. Definition at line 169 of file formmanager.cpp. |
|
Cuts (ie Copies and deletes) the selected widget and all its children of the active Form using an XML representation. Definition at line 751 of file formmanager.cpp. |
|
Deletes the Form form and removes it from our list. Definition at line 591 of file formmanager.cpp. |
|
Deletes the selected widget in active Form and all of its children. Definition at line 700 of file formmanager.cpp. |
|
Used to delayed widgets' deletion (in Container::deleteItem()).
Definition at line 1389 of file formmanager.cpp. |
|
This signal is emitted when any change is made to the Form form, so it will need to be saved. |
|
Creates a dialog to edit the Connection of activeForm(). Definition at line 1221 of file formmanager.cpp. |
|
Creates a dialog to edit the activeForm() PixmapCollection. Definition at line 1211 of file formmanager.cpp. |
|
Displays a dialog where the user can modify the tab order of the active Form, by drag-n-drop or using up/down buttons. Definition at line 1178 of file formmanager.cpp. |
|
Emits the signal createFormSlot(). Used by WidgetPropertySet.
Definition at line 149 of file formmanager.h. |
|
Enables or disables actions name. KFD uses KPart's, action collection here. Kexi implements this to get (shared) actions defined elsewhere. Implemented in KexiFormManager. |
|
Signal emitted when new form gets created. |
|
Definition at line 580 of file formmanager.cpp. |
|
Signal emitted when the form widget is selected inside form. Use this to update actions state. |
|
Adds a existing form w and changes it to a container Definition at line 607 of file formmanager.cpp. |
|
Inits the Form, adds it to m_forms, and conects slots. Definition at line 619 of file formmanager.cpp. |
|
This slot is called when the user presses a "Widget" toolbar button or a "Widget" menu item. Prepares all Forms for creation of a new widget (ie changes cursor ...). Definition at line 278 of file formmanager.cpp. |
|
Definition at line 132 of file formmanager.h. |
|
Definition at line 122 of file formmanager.h. |
|
Definition at line 684 of file formmanager.cpp. |
|
Lay out selected widgets using Grid layout.
Definition at line 1060 of file formmanager.cpp. |
|
Lay out selected widgets using HBox layout (calls CreateLayoutCommand).
Definition at line 1048 of file formmanager.cpp. |
|
Lay out selected widgets using HFlow layout.
Definition at line 1078 of file formmanager.cpp. |
|
Lay out selected widgets in an horizontal splitter.
Definition at line 1066 of file formmanager.cpp. |
|
Lay out selected widgets using VBox layout.
Definition at line 1054 of file formmanager.cpp. |
|
Lay out selected widgets using VFlow layout.
Definition at line 1084 of file formmanager.cpp. |
|
Lay out selected widgets in a verticak splitter.
Definition at line 1072 of file formmanager.cpp. |
|
Slot called when the user chooses an item in signal (or slot) menu. The createdConnection() is updated, and the connection created (for the signal menu). Definition at line 1011 of file formmanager.cpp. |
|
Signal emitted when no form (or a preview form) is selected. Use this to update actions state. |
|
Pastes the XML representation of the copied or cut widget. The widget is pasted when the user clicks the Form to indicate the new position of the widget, or at the position of the contextual menu if there is one. Definition at line 765 of file formmanager.cpp. |
|
Previews the Form form using the widget w as toplevel container for this Form. Definition at line 643 of file formmanager.cpp. |
|
Definition at line 166 of file formmanager.h. |
|
Definition at line 118 of file formmanager.h. |
|
This signal is emited as the property buffer switched. If forceReload is true, the buffer needs to be reloaded even if it's the same as previous one. |
|
Signal emitted when redo action activation changes. text is the full text of the action (including command name). |
|
Resets the Connection being created. We stay in Connection creation mode, but we start a new connection (when the user clicks outside of signals/slots menu). Definition at line 397 of file formmanager.cpp. |
|
Selects all toplevel widgets in trhe current form. Definition at line 1368 of file formmanager.cpp. |
|
Definition at line 126 of file formmanager.h. |
|
Access to FormManager singleton.
Definition at line 163 of file formmanager.cpp. |
|
Sets the external property editor pane used by FormDesigner (it may be docked). Definition at line 177 of file formmanager.cpp. |
|
Sets the point where the pasted widget should be moved to. Definition at line 777 of file formmanager.cpp. |
|
Sets the external object tree view used by FormDesigner (it may be docked). This function also connects appropriate signals and slots to ensure sync with the current Form. Definition at line 186 of file formmanager.cpp. |
|
For debugging purposes only: shows a text window containing contents of .ui XML definition of the current form. Definition at line 1404 of file formmanager.cpp. |
|
Shows a propertybuffer buff in a Property Editor. If buff is 0, Property Editor will be cleared. If forceReload is true, the buffer needs to be reloaded even if it's the same as previous one. Definition at line 1148 of file formmanager.cpp. |
|
Slot called when the user presses 'Pointer' icon. Switch to Default mode.
Definition at line 345 of file formmanager.cpp. |
|
Slot called when the user changes current style using combbox in toolbar or menu. Definition at line 1195 of file formmanager.cpp. |
|
Definition at line 460 of file formmanager.cpp. |
|
Enter the Connection creation mode.
Definition at line 354 of file formmanager.cpp. |
|
Leave the Connection creation mode.
Definition at line 417 of file formmanager.cpp. |
|
Stops the current widget insertion (ie unset the cursor ...). Definition at line 310 of file formmanager.cpp. |
|
Signal emitted when undo action activation changes. text is the full text of the action (including command name). |
|
Signal emitted when a normal widget is selected inside form (ie not form widget). If multiple is true, then more than one widget is selected. Use this to update actions state. |
|
Calls this slot when the window activated changes (eg connect to QWorkspace::windowActivated(QWidget*)). You need to connect to this slot, it will crash otherwise. Definition at line 466 of file formmanager.cpp. |
The documentation for this class was generated from the following files: