summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBoris Moiseev <cyberbobs@gmail.com>2010-10-06 13:51:31 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-10-06 13:51:31 (GMT)
commit24ea581ffff713a591157b6ca3d4749824020a0a (patch)
tree2caf7cfbe729c60e505b5483059e5f76bf77e215 /tools
parent0ece9b7f45e2cda9dfeb8dbab9b51ad39433c07e (diff)
downloadQt-24ea581ffff713a591157b6ca3d4749824020a0a.zip
Qt-24ea581ffff713a591157b6ca3d4749824020a0a.tar.gz
Qt-24ea581ffff713a591157b6ca3d4749824020a0a.tar.bz2
Removed more legacy code from qtconfig and fixed codestyle issues
Merge-request: 2286 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qtconfig/previewframe.cpp15
-rw-r--r--tools/qtconfig/previewframe.h10
-rw-r--r--tools/qtconfig/previewwidget.cpp4
-rw-r--r--tools/qtconfig/previewwidget.h6
4 files changed, 17 insertions, 18 deletions
diff --git a/tools/qtconfig/previewframe.cpp b/tools/qtconfig/previewframe.cpp
index 3b46e8d..95d64cf 100644
--- a/tools/qtconfig/previewframe.cpp
+++ b/tools/qtconfig/previewframe.cpp
@@ -47,8 +47,8 @@
QT_BEGIN_NAMESPACE
-PreviewFrame::PreviewFrame( QWidget *parent, const char *name )
- : QFrame( parent, name )
+PreviewFrame::PreviewFrame(QWidget *parent)
+ : QFrame(parent)
{
setMinimumSize(200, 200);
setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
@@ -82,23 +82,22 @@ void PreviewFrame::setPreviewVisible(bool visible)
workspace->viewport()->update();
}
-Workspace::Workspace(PreviewFrame* parent, const char* name)
+Workspace::Workspace(PreviewFrame* parent)
: 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* )
{
- 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
diff --git a/tools/qtconfig/previewframe.h b/tools/qtconfig/previewframe.h
index de364e4..b21e529 100644
--- a/tools/qtconfig/previewframe.h
+++ b/tools/qtconfig/previewframe.h
@@ -54,11 +54,11 @@ class Workspace : public QMdiArea
Q_OBJECT
public:
- Workspace( PreviewFrame* parent = 0, const char* name = 0 );
+ Workspace(PreviewFrame *parent = 0);
~Workspace() {}
protected:
- void paintEvent( QPaintEvent* );
+ void paintEvent(QPaintEvent *);
private:
PreviewFrame *previewFrame;
};
@@ -68,14 +68,14 @@ class PreviewFrame : public QFrame
Q_OBJECT
public:
- PreviewFrame( QWidget *parent = 0, const char *name = 0 );
+ PreviewFrame(QWidget *parent = 0);
void setPreviewPalette(QPalette);
void setPreviewVisible(bool val);
QString previewText() const;
PreviewWidget *widget() const { return previewWidget; }
private:
- Workspace *workspace;
- PreviewWidget *previewWidget;
+ Workspace *workspace;
+ PreviewWidget *previewWidget;
QString m_previewWindowText;
};
diff --git a/tools/qtconfig/previewwidget.cpp b/tools/qtconfig/previewwidget.cpp
index 9fa9591..abbf669 100644
--- a/tools/qtconfig/previewwidget.cpp
+++ b/tools/qtconfig/previewwidget.cpp
@@ -50,8 +50,8 @@ PreviewWidget::PreviewWidget(QWidget *parent)
setupUi(this);
// install event filter on child widgets
- QList<QWidget*> l = findChildren<QWidget*>();
- foreach(QWidget* w, l) {
+ QList<QWidget *> l = findChildren<QWidget*>();
+ foreach(QWidget *w, l) {
w->installEventFilter(this);
w->setFocusPolicy(Qt::NoFocus);
}
diff --git a/tools/qtconfig/previewwidget.h b/tools/qtconfig/previewwidget.h
index ee5ae02..1452932 100644
--- a/tools/qtconfig/previewwidget.h
+++ b/tools/qtconfig/previewwidget.h
@@ -51,10 +51,10 @@ class PreviewWidget : public QWidget, public Ui::PreviewWidget
Q_OBJECT
public:
- PreviewWidget(QWidget* parent = 0);
+ PreviewWidget(QWidget *parent = 0);
- void closeEvent(QCloseEvent*);
- bool eventFilter(QObject*, QEvent*);
+ void closeEvent(QCloseEvent *);
+ bool eventFilter(QObject *, QEvent *);
};
QT_END_NAMESPACE