diff options
Diffstat (limited to 'tools/qtconfig/previewframe.cpp')
-rw-r--r-- | tools/qtconfig/previewframe.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/qtconfig/previewframe.cpp b/tools/qtconfig/previewframe.cpp index f37ac78..3b46e8d 100644 --- a/tools/qtconfig/previewframe.cpp +++ b/tools/qtconfig/previewframe.cpp @@ -40,7 +40,6 @@ ****************************************************************************/ #include "previewframe.h" -#include "previewwidget.h" #include <QBoxLayout> #include <QPainter> @@ -48,8 +47,8 @@ QT_BEGIN_NAMESPACE -PreviewFrame::PreviewFrame(QWidget *parent) - : QFrame(parent) +PreviewFrame::PreviewFrame( QWidget *parent, const char *name ) + : QFrame( parent, name ) { setMinimumSize(200, 200); setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); @@ -83,22 +82,23 @@ void PreviewFrame::setPreviewVisible(bool visible) workspace->viewport()->update(); } -Workspace::Workspace(PreviewFrame *parent) +Workspace::Workspace(PreviewFrame* parent, const char* name) : QMdiArea(parent) { previewFrame = parent; PreviewWidget *previewWidget = previewFrame->widget(); + setObjectName(QLatin1String(name)); QMdiSubWindow *frame = addSubWindow(previewWidget, Qt::Window); - frame->move(10, 10); + frame->move(10,10); frame->show(); } -void Workspace::paintEvent(QPaintEvent *) +void Workspace::paintEvent( QPaintEvent* ) { - QPainter p(viewport()); + QPainter p (viewport()); p.fillRect(rect(), palette().color(backgroundRole()).dark()); - p.setPen(QPen(Qt::white)); - p.drawText(0, height() / 2, width(), height(), Qt::AlignHCenter, previewFrame->previewText()); + p.setPen( QPen( Qt::white ) ); + p.drawText ( 0, height() / 2, width(), height(), Qt::AlignHCenter, previewFrame->previewText()); } QT_END_NAMESPACE |