From 5e4f16e92a96bdf89f82be3b231d18ae9e257486 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 12 Jun 2005 22:36:41 +0000 Subject: fixxxx --- (limited to 'microkde') diff --git a/microkde/kcolorbutton.cpp b/microkde/kcolorbutton.cpp index 96dc256..197bea2 100644 --- a/microkde/kcolorbutton.cpp +++ b/microkde/kcolorbutton.cpp @@ -16,6 +16,7 @@ void KColorButton:: edit() mColor = col; setColor ( mColor ); emit changed ( mColor ); + emit changedID ( mColor, id ); } #else KColorDialog* k = new KColorDialog( this ); @@ -25,6 +26,7 @@ void KColorButton:: edit() mColor = k->getColor(); setColor ( mColor ); emit changed ( mColor ); + emit changedID ( mColor, id ); } delete k; #endif @@ -35,9 +37,14 @@ KColorButton::KColorButton( QWidget *p ):QPushButton( p ) if( QApplication::desktop()->width() < 480 || QApplication::desktop()->height() <= 320 ) size = 18; setFixedSize( size,size ); + int id = 0; connect ( this, SIGNAL( clicked() ), this ,SLOT (edit() )); } +void KColorButton::setID ( int i) +{ + id = i; +} void KColorButton::setColor ( const QColor & c) { mColor = c; diff --git a/microkde/kcolorbutton.h b/microkde/kcolorbutton.h index 88b3774..983771b 100644 --- a/microkde/kcolorbutton.h +++ b/microkde/kcolorbutton.h @@ -14,13 +14,16 @@ Q_OBJECT public: KColorButton( QWidget *p ); void setColor ( const QColor &); + void setID ( int i) ; QColor color() const { return mColor ; } signals: void changed(const QColor &); + void changedID(const QColor &, int id); private slots: void edit(); private: QColor mColor; + int id; }; #endif -- cgit v0.9.0.2