diff options
author | Jean Claveau <jean.claveau@c277.fr> | 2014-09-09 13:02:40 +0200 |
---|---|---|
committer | Jean Claveau <jean.claveau@c277.fr> | 2014-09-09 13:02:40 +0200 |
commit | 004216e72c20ea3c0c090e1db43d39d86c524dab (patch) | |
tree | 8ec21f83c79e8014188c8d6458f210cbe27d3a6f | |
parent | 3641ff29c0d4e759fe795f57991e968849ff1e13 (diff) |
cleaning
-rw-r--r-- | src/widget/wpushbutton.cpp | 43 | ||||
-rw-r--r-- | src/widget/wpushbutton.h | 4 |
2 files changed, 0 insertions, 47 deletions
diff --git a/src/widget/wpushbutton.cpp b/src/widget/wpushbutton.cpp index 280820f5ad..83df2d9bdb 100644 --- a/src/widget/wpushbutton.cpp +++ b/src/widget/wpushbutton.cpp @@ -203,33 +203,6 @@ void WPushButton::setStates(int iStates) { m_align.resize(iStates); } - - - -void WPushButton::setPixmap(int iState, bool bPressed, const QString& filename) { - QVector<PaintablePointer>& pixmaps = bPressed ? - m_pressedPixmaps : m_unpressedPixmaps; - - if (iState < 0 || iState >= pixmaps.size()) { - return; - } - - PaintablePointer pPixmap = WPixmapStore::getPaintable(filename, - Paintable::STRETCH); - - if (pPixmap.isNull() || pPixmap->isNull()) { - // Only log if it looks like the user tried to specify a pixmap. - if (!filename.isEmpty()) { - qDebug() << "WPushButton: Error loading pixmap:" << filename; - } - } else { - // Set size of widget equal to pixmap size - setFixedSize(pPixmap->size()); - } - pixmaps.replace(iState, pPixmap); -} - - void WPushButton::setPixmap(int iState, bool bPressed, PixmapSource* source) { QVector<PaintablePointer>& pixmaps = bPressed ? m_pressedPixmaps : m_unpressedPixmaps; @@ -253,20 +226,6 @@ void WPushButton::setPixmap(int iState, bool bPressed, PixmapSource* source) { pixmaps.replace(iState, pPixmap); } - - - -void WPushButton::setPixmapBackground(const QString &filename, - Paintable::DrawMode mode) { - // Load background pixmap - m_pPixmapBack = WPixmapStore::getPaintable(filename, mode); - if (!filename.isEmpty() && - (m_pPixmapBack.isNull() || m_pPixmapBack->isNull())) { - // Only log if it looks like the user tried to specify a pixmap. - qDebug() << "WPushButton: Error loading background pixmap:" << filename; - } -} - void WPushButton::setPixmapBackground(PixmapSource* source, Paintable::DrawMode mode) { // Load background pixmap @@ -278,8 +237,6 @@ void WPushButton::setPixmapBackground(PixmapSource* source, } } - - void WPushButton::onConnectedControlChanged(double dParameter, double dValue) { Q_UNUSED(dParameter); // Enums are not currently represented using parameter space so it doesn't diff --git a/src/widget/wpushbutton.h b/src/widget/wpushbutton.h index 2d22bd46fb..b37f037e31 100644 --- a/src/widget/wpushbutton.h +++ b/src/widget/wpushbutton.h @@ -78,14 +78,10 @@ class WPushButton : public WWidget { private: // Associates a pixmap of a given state of the button with the widget - // template<typename pixmapSource> void setPixmap(int iState, bool bPressed, PixmapSource* source); - void setPixmap(int iState, bool bPressed, const QString& filename); - // void setPixmap(int iState, bool bPressed, const QString &filename); // Associates a background pixmap with the widget. This is only needed if // the button pixmaps contains alpha channel values. - void setPixmapBackground(const QString &filename, Paintable::DrawMode mode); void setPixmapBackground(PixmapSource* source, Paintable::DrawMode mode); |