summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Feck <[email protected]>2014-10-04 19:35:27 +0200
committerChristoph Feck <[email protected]>2014-10-04 19:35:27 +0200
commit65cc12ceae9b38916f1665a773d81b71d0c25cb4 (patch)
tree812e444cc350b24533a512f8b2c4be3076d5ca60
parent0b0861c6cd0943c7ccebd0f247d0b80e4a688531 (diff)
KColorDialog -> QColorDialog
-rw-r--r--widgets/kpColorCells.cpp11
-rw-r--r--widgets/kpDualColorButton.cpp11
2 files changed, 10 insertions, 12 deletions
diff --git a/widgets/kpColorCells.cpp b/widgets/kpColorCells.cpp
index 180f223..6fe40ae 100644
--- a/widgets/kpColorCells.cpp
+++ b/widgets/kpColorCells.cpp
@@ -31,11 +31,11 @@
#include <kpColorCells.h>
+#include <QColorDialog>
#include <QContextMenuEvent>
#include <QMouseEvent>
#include <QScrollBar>
-#include <KColorDialog>
#include <KDebug>
#include <KLocale>
@@ -561,12 +561,11 @@ void kpColorCells::slotColorSelected (int cell, const QColor &color,
// protected slot
void kpColorCells::slotColorDoubleClicked (int cell, const QColor &)
{
- KColorDialog dialog(this);
- dialog.setColor(kpColorCellsBase::color(cell));
- dialog.setAlphaChannelEnabled(true);
- dialog.setButtons(KDialog::Ok | KDialog::Cancel);
+ QColorDialog dialog(this);
+ dialog.setCurrentColor(kpColorCellsBase::color(cell));
+ dialog.setOptions(QColorDialog::ShowAlphaChannel);
if ( dialog.exec() == QDialog::Accepted )
- setColor (cell, dialog.color());
+ setColor (cell, dialog.currentColor());
}
//---------------------------------------------------------------------
diff --git a/widgets/kpDualColorButton.cpp b/widgets/kpDualColorButton.cpp
index 8b57c8a..d7023fe 100644
--- a/widgets/kpDualColorButton.cpp
+++ b/widgets/kpDualColorButton.cpp
@@ -33,12 +33,12 @@
#include <QApplication>
#include <QBitmap>
+#include <QColorDialog>
#include <QDrag>
#include <QMouseEvent>
#include <QPainter>
#include <qdrawutil.h>
-#include <KColorDialog>
#include <KColorMimeData>
#include <KDebug>
#include <KIconLoader>
@@ -358,12 +358,11 @@ void kpDualColorButton::mouseDoubleClickEvent (QMouseEvent *e)
if (whichColor == 0 || whichColor == 1)
{
- KColorDialog dialog(this);
- dialog.setColor(color(whichColor).toQColor());
- dialog.setAlphaChannelEnabled(true);
- dialog.setButtons(KDialog::Ok | KDialog::Cancel);
+ QColorDialog dialog(this);
+ dialog.setCurrentColor(color(whichColor).toQColor());
+ dialog.setOptions(QColorDialog::ShowAlphaChannel);
if ( dialog.exec() == QDialog::Accepted )
- setColor(whichColor, kpColor(dialog.color().rgba()));
+ setColor(whichColor, kpColor(dialog.currentColor().rgba()));
}
}