QDesignerPropertyEditor Class Reference

#include <qdesigner_propertyeditor.h>

Inheritance diagram for QDesignerPropertyEditor:

Inheritance graph
[legend]
Collaboration diagram for QDesignerPropertyEditor:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 31 of file qdesigner_propertyeditor.h.

Public Member Functions

 QDesignerPropertyEditor (QDesignerWorkbench *workbench)
virtual ~QDesignerPropertyEditor ()
virtual QRect geometryHint () const

Protected Member Functions

virtual void showEvent (QShowEvent *event)


Constructor & Destructor Documentation

QDesignerPropertyEditor::QDesignerPropertyEditor ( QDesignerWorkbench workbench  ) 

Definition at line 33 of file qdesigner_propertyeditor.cpp.

References QDesignerToolWindow::action(), QDesignerWorkbench::core(), QDesignerComponents::createPropertyEditor(), QMainWindow::setCentralWidget(), QObject::setObjectName(), QDesignerFormEditorInterface::setPropertyEditor(), QAction::setShortcut(), QWidget::setWindowTitle(), and QDesignerToolWindow::workbench().

00034     : QDesignerToolWindow(workbench)
00035 {
00036     setObjectName(QLatin1String("PropertyEditor"));
00037     QDesignerPropertyEditorInterface *widget = QDesignerComponents::createPropertyEditor(workbench->core(), this);
00038     workbench->core()->setPropertyEditor(widget);
00039 
00040     setCentralWidget(widget);
00041 
00042     setWindowTitle(tr("Property Editor"));
00043     action()->setShortcut(tr("Ctrl+I"));
00044 }

Here is the call graph for this function:

QDesignerPropertyEditor::~QDesignerPropertyEditor (  )  [virtual]

Definition at line 46 of file qdesigner_propertyeditor.cpp.

00047 {
00048 }


Member Function Documentation

QRect QDesignerPropertyEditor::geometryHint (  )  const [virtual]

Reimplemented from QDesignerToolWindow.

Definition at line 50 of file qdesigner_propertyeditor.cpp.

References QDesignerWorkbench::availableGeometry(), g, QDesignerWorkbench::marginHint(), spacing, and QDesignerToolWindow::workbench().

00051 {
00052     QRect g = workbench()->availableGeometry();
00053     int margin = workbench()->marginHint();
00054     int spacing = 40;
00055 
00056     QSize sz(g.width() * 1/4, g.height() * 4/6);
00057 
00058     return QRect((g.width() - sz.width() - margin), (margin + g.height() * 1/6) + spacing,
00059                   sz.width(), sz.height());
00060 }

Here is the call graph for this function:

void QDesignerPropertyEditor::showEvent ( QShowEvent event  )  [protected, virtual]

This event handler can be reimplemented in a subclass to receive widget show events which are passed in the event parameter.

Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of windows are delivered afterwards.

Note: A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g. a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again. After receiving a spontaneous hide event, a widget is still considered visible in the sense of isVisible().

See also:
visible, event(), QShowEvent

Reimplemented from QDesignerToolWindow.

Definition at line 62 of file qdesigner_propertyeditor.cpp.

References QMainWindow::event(), QDesignerToolWindow::showEvent(), and QDesignerToolWindow::workbench().

00063 {
00064     if (QDesignerPropertyEditorInterface *e = workbench()->core()->propertyEditor()) {
00065         // workaround to update the propertyeditor when it is not visible!
00066         e->setObject(e->object()); // ### remove me
00067     }
00068 
00069     QDesignerToolWindow::showEvent(event);
00070 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 17:18:33 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1