Commit e44aa3be authored by Boudewijn Rempt's avatar Boudewijn Rempt

Remove obsolete popup palette signals

This is now handled by the resource manager.
parent a6c6729d
......@@ -67,7 +67,7 @@
//Favorite resource Manager
#include <kis_favorite_resource_manager.h>
#include <kis_paintop_box.h>
#include <kis_popup_palette.h>
#include "input/kis_input_manager.h"
......@@ -121,12 +121,10 @@ public:
QBitArray channelFlags;
};
KisCanvas2::KisCanvas2(KisCoordinatesConverter* coordConverter, KisView2 * view, KoShapeBasedDocumentBase * sc)
KisCanvas2::KisCanvas2(KisCoordinatesConverter *coordConverter, KisView2 *view, KoShapeBasedDocumentBase *sc)
: KoCanvasBase(sc)
, m_d(new KisCanvas2Private(this, coordConverter, view))
{
// a bit of duplication from slotConfigChanged()
KisConfig cfg;
m_d->vastScrolling = cfg.vastScrolling();
......@@ -793,7 +791,6 @@ QPoint KisCanvas2::documentOffset() const
void KisCanvas2::createFavoriteResourceManager(KisPaintopBox* paintopbox)
{
m_d->favoriteResourceManager = new KisFavoriteResourceManager(paintopbox, canvasWidget());
connect(this, SIGNAL(favoritePaletteCalled(QPoint)), favoriteResourceManager(), SLOT(slotShowPopupPalette(QPoint)));
connect(view()->resourceProvider(), SIGNAL(sigFGColorUsed(KoColor)), favoriteResourceManager(), SLOT(slotAddRecentColor(KoColor)));
connect(view()->resourceProvider(), SIGNAL(sigFGColorChanged(KoColor)), favoriteResourceManager(), SLOT(slotChangeFGColorSelector(KoColor)));
connect(favoriteResourceManager(), SIGNAL(sigSetFGColor(KoColor)), view()->resourceProvider(), SLOT(slotSetFGColor(KoColor)));
......
......@@ -158,8 +158,6 @@ public: // KisCanvas2 methods
signals:
void imageChanged(KisImageWSP image);
void favoritePaletteCalled(const QPoint&);
void sigCanvasCacheUpdated(KisUpdateInfoSP);
void sigContinueResizeImage(qint32 w, qint32 h);
......
......@@ -39,7 +39,12 @@
class PopupColorTriangle : public KoTriangleColorSelector
{
public:
PopupColorTriangle(QWidget* parent) : KoTriangleColorSelector(parent), m_dragging(false) {}
PopupColorTriangle(QWidget* parent)
: KoTriangleColorSelector(parent)
, m_dragging(false)
{
}
virtual ~PopupColorTriangle() {}
void tabletEvent(QTabletEvent* event)
......@@ -79,8 +84,8 @@ private:
KisPopupPalette::KisPopupPalette(KisFavoriteResourceManager* manager, QWidget *parent)
: QWidget(parent, Qt::FramelessWindowHint)
, m_resourceManager (manager)
, m_triangleColorSelector (0)
, m_resourceManager(manager)
, m_triangleColorSelector(0)
, m_timer(0)
{
m_triangleColorSelector = new PopupColorTriangle(this);
......@@ -230,7 +235,7 @@ void KisPopupPalette::paintEvent(QPaintEvent* e)
painter.drawPath(path2);
//painting favorite brushes
QList<QImage> images (m_resourceManager->favoritePresetImages());
QList<QImage> images(m_resourceManager->favoritePresetImages());
//painting favorite brushes pixmap/icon
QPainterPath path;
......@@ -465,8 +470,6 @@ bool KisPopupPalette::isPointInPixmap(QPointF& point, int pos)
KisPopupPalette::~KisPopupPalette()
{
delete m_triangleColorSelector;
m_triangleColorSelector = 0;
m_resourceManager = 0;
}
QPainterPath KisPopupPalette::pathFromPresetIndex(int index)
......
......@@ -38,7 +38,7 @@ class KisPopupPalette : public QWidget
Q_PROPERTY (int selectedColor READ selectedColor WRITE setSelectedColor)
public:
KisPopupPalette(KisFavoriteResourceManager* , QWidget *parent=0);
KisPopupPalette(KisFavoriteResourceManager*, QWidget *parent = 0);
~KisPopupPalette();
QSize sizeHint() const;
......
......@@ -101,7 +101,6 @@ KisToolPaint::KisToolPaint(KoCanvasBase * canvas, const QCursor & cursor)
addAction("decrease_brush_size", dynamic_cast<KAction*>(collection->action("decrease_brush_size")));
KisCanvas2 * kiscanvas = static_cast<KisCanvas2*>(canvas);
connect(this, SIGNAL(sigFavoritePaletteCalled(const QPoint&)), kiscanvas, SIGNAL(favoritePaletteCalled(const QPoint&)));
connect(this, SIGNAL(sigPaintingFinished()), kiscanvas->view()->resourceProvider(), SLOT(slotPainting()));
}
......
......@@ -187,7 +187,6 @@ private:
bool m_isOutlineEnabled;
signals:
void sigFavoritePaletteCalled(const QPoint&);
void sigPaintingFinished();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment