[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/libs/guiutils
From: Thomas Zander <zander () kde ! org>
Date: 2009-04-15 20:36:31
Message-ID: 1239827791.060396.11165.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 954508 by zander:
* cleanups like removing of the 'super' typedef.
* add d-pointer to this exported class.
* add const to the getter
* remove excessive whitespace to comply with the coding style
M +18 -8 KoUniColorDialog.cpp
M +6 -9 KoUniColorDialog.h
--- trunk/koffice/libs/guiutils/KoUniColorDialog.cpp #954507:954508
@@ -1,5 +1,6 @@
/**
* Copyright (c) 2006 Casper Boemann (cbr@boemann.dk)
+ * Copyright (c) 2009 Thomas Zander <zander@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -18,20 +19,29 @@
*/
#include <klocale.h>
#include "KoUniColorDialog.h"
+#include "KoUniColorChooser.h"
+class KoUniColorDialogPrivate
+{
+public:
+ KoUniColorDialogPrivate() : chooser(0) {}
+ KoUniColorChooser *chooser;
+};
+
KoUniColorDialog::KoUniColorDialog(KoColor &initialColor, QWidget *parent)
- : KPageDialog( parent )
- {
- setFaceType( Plain );
+ : KPageDialog(parent),
+ d(new KoUniColorDialogPrivate())
+{
+ setFaceType(Plain);
- m_chooser = new KoUniColorChooser( );
- m_chooser->setColor(initialColor);
- addPage( m_chooser, i18n( "Color Selector") );
+ d->chooser = new KoUniColorChooser();
+ d->chooser->setColor(initialColor);
+ addPage(d->chooser, i18n("Color Selector"));
}
-KoColor KoUniColorDialog::color()
+KoColor KoUniColorDialog::color() const
{
- return m_chooser->color();
+ return d->chooser->color();
}
#include "KoUniColorDialog.moc"
--- trunk/koffice/libs/guiutils/KoUniColorDialog.h #954507:954508
@@ -1,5 +1,6 @@
/**
* Copyright (c) 2006 Casper Boemann (cbr@boemann.dk)
+ * Copyright (c) 2009 Thomas Zander <zander@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -20,35 +21,31 @@
#define KOUNICOLORDIALOG_H
#include "KoColor.h"
-#include "KoUniColorChooser.h"
#include <kpagedialog.h>
#include "koguiutils_export.h"
+class KoUniColorDialogPrivate;
/**
* @short A colormanaged dialog for selecting a colors.
*
* KoUniColorDialog is simply the dialog'ification of KoUniColorChooser.
- *
*/
-class KOGUIUTILS_EXPORT KoUniColorDialog
- : public KPageDialog
+class KOGUIUTILS_EXPORT KoUniColorDialog : public KPageDialog
{
Q_OBJECT
- typedef KPageDialog super;
-
public:
- explicit KoUniColorDialog(KoColor &initialColor, QWidget *parent = 0L);
+ explicit KoUniColorDialog(KoColor &initialColor, QWidget *parent = 0);
virtual ~KoUniColorDialog() {}
/**
* @return the selected color
*/
- KoColor color();
+ KoColor color() const;
private:
- KoUniColorChooser *m_chooser;
+ KoUniColorDialogPrivate *d;
};
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic