X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fcolorbutton.cpp;h=29327e8158f886962ba6c1699c7a17222ae8303b;hp=c42f15257499ed10297fb108207ff5d16009a4d9;hb=ac654fdeeece68d64561920479f064ad3c237e26;hpb=5227fae052f5e5567eddeed37daca8bafc9f0351 diff --git a/src/uisupport/colorbutton.cpp b/src/uisupport/colorbutton.cpp index c42f1525..29327e81 100644 --- a/src/uisupport/colorbutton.cpp +++ b/src/uisupport/colorbutton.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "colorbutton.h" @@ -30,33 +30,40 @@ # include #endif -ColorButton::ColorButton(QWidget *parent) : QToolButton(parent) { - setText(""); - connect(this, SIGNAL(clicked()), SLOT(chooseColor())); +ColorButton::ColorButton(QWidget *parent) : QToolButton(parent) +{ + setText(""); + connect(this, SIGNAL(clicked()), SLOT(chooseColor())); } -void ColorButton::setColor(const QColor &color) { - _color = color; - QPixmap pixmap(QSize(32,32)); - pixmap.fill(color); - setIcon(pixmap); - emit colorChanged(color); +void ColorButton::setColor(const QColor &color) +{ + _color = color; + QPixmap pixmap(QSize(32, 32)); + pixmap.fill(color); + setIcon(pixmap); + + emit colorChanged(color); } -QColor ColorButton::color() const { - return _color; + +QColor ColorButton::color() const +{ + return _color; } -void ColorButton::chooseColor() { + +void ColorButton::chooseColor() +{ #ifdef HAVE_KDE - QColor c = color(); - KColorDialog::getColor(c, this); + QColor c = color(); + KColorDialog::getColor(c, this); #else - QColor c = QColorDialog::getColor(color(), this); + QColor c = QColorDialog::getColor(color(), this); #endif - if(c.isValid()) { - setColor(c); - } + if (c.isValid()) { + setColor(c); + } }