diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-06 15:56:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-06 15:56:40 -0600 |
commit | e16866e072f94410321d70daedbcb855ea878cac (patch) | |
tree | ee3f52eabde7da1a0e6ca845fb9c2813cf1558cf /kdeui/tests/kdualcolortest.cpp | |
parent | a58c20c1a7593631a1b50213c805507ebc16adaf (diff) | |
download | tdelibs-e16866e072f94410321d70daedbcb855ea878cac.tar.gz tdelibs-e16866e072f94410321d70daedbcb855ea878cac.zip |
Actually move the kde files that were renamed in the last commit
Diffstat (limited to 'kdeui/tests/kdualcolortest.cpp')
-rw-r--r-- | kdeui/tests/kdualcolortest.cpp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/kdeui/tests/kdualcolortest.cpp b/kdeui/tests/kdualcolortest.cpp deleted file mode 100644 index 507030132..000000000 --- a/kdeui/tests/kdualcolortest.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include "kdualcolortest.h" -#include <kdualcolorbutton.h> -#include <kapplication.h> -#include <klocale.h> -#include <tqlayout.h> -#include <tqpalette.h> - -KDualColorWidget::KDualColorWidget(TQWidget *parent, const char *name) - : TQWidget(parent, name) -{ - lbl = new TQLabel("Testing, testing, 1, 2, 3...", this); - KDualColorButton *colorBtn = - new KDualColorButton(lbl->tqcolorGroup().text(), - lbl->tqcolorGroup().background(), this); - connect(colorBtn, TQT_SIGNAL(fgChanged(const TQColor &)), - TQT_SLOT(slotFgChanged(const TQColor &))); - connect(colorBtn, TQT_SIGNAL(bgChanged(const TQColor &)), - TQT_SLOT(slotBgChanged(const TQColor &))); - connect(colorBtn, TQT_SIGNAL(currentChanged(KDualColorButton::DualColor)), - TQT_SLOT(slotCurrentChanged(KDualColorButton::DualColor))); - - TQHBoxLayout *layout = new TQHBoxLayout(this, 5); - layout->addWidget(colorBtn, 0); - layout->addWidget(lbl, 1); - layout->activate(); - resize(tqsizeHint()); -} - -void KDualColorWidget::slotFgChanged(const TQColor &c) -{ - TQPalette p = lbl->palette(); - p.setColor(TQColorGroup::Text, c); - lbl->setPalette(p); -} - -void KDualColorWidget::slotBgChanged(const TQColor &c) -{ - TQPalette p = lbl->palette(); - TQBrush b(c, SolidPattern); - p.setBrush(TQColorGroup::Background, b); - setPalette(p); -} - -void KDualColorWidget::slotCurrentChanged(KDualColorButton::DualColor current) -{ - if(current == KDualColorButton::Foreground) - qDebug("Foreground Button Selected."); - else - qDebug("Background Button Selected."); -} - -int main(int argc, char **argv) -{ - KApplication *app = new KApplication(argc, argv, "KDualColorTest"); - KDualColorWidget w; - app->setMainWidget(&w); - w.show(); - return(app->exec()); -} - -#include "kdualcolortest.moc" - - |