summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-18 17:14:20 (UTC)
committer zautrix <zautrix>2005-06-18 17:14:20 (UTC)
commit45c93de5a458e7ca0c293eebe504a9d949cc045c (patch) (side-by-side diff)
treec303812528fbd3fa1868928abfe198471395bb5b
parent1919ddd25fb835b0eb03a44cbfbf4713d45266b8 (diff)
downloadkdepimpi-45c93de5a458e7ca0c293eebe504a9d949cc045c.zip
kdepimpi-45c93de5a458e7ca0c293eebe504a9d949cc045c.tar.gz
kdepimpi-45c93de5a458e7ca0c293eebe504a9d949cc045c.tar.bz2
color dialog
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rwxr-xr-xmicrokde/fncolordialog.cpp334
-rwxr-xr-xmicrokde/fncolordialog.h137
-rw-r--r--microkde/kcolordialog.cpp80
-rw-r--r--microkde/kcolordialog.h13
-rw-r--r--microkde/microkdeE.pro4
6 files changed, 482 insertions, 88 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index dd02be5..322c0e6 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,137 +1,139 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.1.8 ************
KO/Pi:
Added info about the completion sate of a todo in the ListView/Searchdialog.
If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
KA/Pi:
In the addressee selection dialog now the formatted name is shown, if not empty.
Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
Fixed the sorting for size in the file selector on the Z.
+Changed the color selection dialog on the Zaurus to a more user friendly version.
+
********** VERSION 2.1.7 ************
KO/Pi:
Fixed several problems in the new Resource handling.
Added more options to the search dialog.
Fixed a problem in the Month view.
Added more options to the dialog when setting a todo to stopped.
Fixed two small problems in KO/PiAlarm applet.
********** VERSION 2.1.6 ************
This release is for testing only.
KO/Pi:
Added to the list view (the list view is used in search dialog as well) the possibility to print it.
Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later.
Now on every sync the set of calendars is synced which are enabled in the resource view.
A calendar is enabled in the resource view if the "eye" column is checked.
You can set a calendar to be the default for new items( "+" column ).
You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly.
To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ...
********** VERSION 2.1.5 ************
This is the new stable version.
Bugfix:
Fixed a problem with agenda popup on the desktop in KO/Pi.
Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
Added config option to not display completed todos in agenda view.
Addressee view is now using the formatted name, if defined.
That makes it possible to display "lastname, firstname" in that view now.
To set the formatted name for all contacts, please use menu:
Edit->Change->Set formatted name.
Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
********** VERSION 2.1.4 ************
Fixed two more bugs in the KA/Pi CSV import dialog:
Made it possible to read multi-line fields and import it to the "Note" field.
Fixed a problem in mapping custom fields, whatever a custem field is...
********** VERSION 2.1.3 ************
Changed the menu structure of the alarm applet:
Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
Fixed several problems in the KA/Pi CSV import dialog:
Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
********** VERSION 2.1.2 ************
Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
Fixed a problem when importing data from Outlook with mutiple categories set.
Changed display of days in datenavigator:
Birthdays are now blue, not dark green.
When todo view is shown, no birtdays are shown and days with due todos are shown blue.
When journal view is shown, only holidays are shown and days with journals are blue.
Added Backup options to global config:
You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
********** VERSION 2.1.1 ************
Stable release 2.1.1!
KO/Pi:
Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
********** VERSION 2.1.0 ************
Stable release 2.1.0!
Summary of changes/fixes compared to version 2.0.6:
Many bugs of version 2.0.6 fixed.
Most of them were small bugs, but some of them were important.
It is recommended to use version 2.1.0 and not version 2.0.6.
Important changes:
Added recurring todos to KO/Pi.
Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
Datenavigator can now display many months. Very useful on the desktop.
KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
Made alarm sound working on Linux desktop.
Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
Many other usebility enhancements.
Special thanks to Ben for his suggestions!
You can find the complete changelog
from version 1.7.7 to 2.1.0
in the source package or on
http://www.pi-sync.net/html/changelog.html
diff --git a/microkde/fncolordialog.cpp b/microkde/fncolordialog.cpp
new file mode 100755
index 0000000..f1ffa5b
--- a/dev/null
+++ b/microkde/fncolordialog.cpp
@@ -0,0 +1,334 @@
+/* this program for Sharp SLA300, B500, C7x0, C860 Linux PDA
+ Copyright (C) 2003-2005 Joe Kanemori.<kanemori@ymg.urban.ne.jp>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundatibannwaon; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ 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
+*/
+
+#include <qwidget.h>
+#include <qimage.h>
+#include <qbrush.h>
+#include <qpainter.h>
+#include <qlabel.h>
+#include "fncolordialog.h"
+
+
+//-----------------------------------------------------------------------------
+// FNPaletteBase
+//-----------------------------------------------------------------------------
+/*
+ * Constructs a Example which is a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'
+ */
+FNPaletteBase::FNPaletteBase(QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl ), bgcolor_(white), _isblock(false)
+{
+ this->setBackgroundMode(NoBackground);
+ wbuf_.resize(32, 32);
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+FNPaletteBase::~FNPaletteBase()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+
+/*
+ * Painting event.
+ */
+void FNPaletteBase::paintEvent(QPaintEvent*)
+{
+ bitBlt(this, 0, 0, &wbuf_);
+}
+
+
+/*
+ * Painting event.
+ */
+void FNPaletteBase::resizeEvent(QResizeEvent* evt)
+{
+ QPixmap save(wbuf_);
+ wbuf_.resize(evt->size());
+ wbuf_.fill(bgcolor_);
+ bitBlt(&wbuf_, 0, 0, &save);
+ redraw();
+}
+
+
+/*
+ * Redraw method.
+ */
+void FNPaletteBase::redraw(bool force)
+{
+ if (!force) {
+ if (_isblock) {
+ return;
+ }
+ }
+ _isblock = true;
+ wbuf_.fill(bgcolor_);
+ QPainter pa;
+ pa.begin(&wbuf_);
+ drawImpl(pa);
+ pa.end();
+ repaint();
+ _isblock = false;
+}
+
+
+/*
+ * Redraw Implement
+ */
+void FNPaletteBase::drawImpl(QPainter& pa)
+{
+ pa.flush();
+}
+
+bool FNPaletteBase::pickColor(int x, int y)
+{
+ if (0 <= x && 0 <= y && x < width() && y < height()) {
+ selection_ = QColor(wbuf_.convertToImage().pixel(x, y));
+ return true;
+ } else {
+ return false;
+ }
+}
+
+void FNPaletteBase::mouseReleaseEvent(QMouseEvent* evt)
+{
+ //マウスリリースイベント(MouseClicked)
+ if (pickColor(evt->x(), evt->y())) {
+ emit clicked(this);
+ }
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// FNColorPalette
+//-----------------------------------------------------------------------------
+FNColorPalette::FNColorPalette(QColor c, QWidget* parent, const char* name, WFlags fl)
+:FNPaletteBase(parent, name, fl)
+{
+ setBGColor(c);
+}
+
+FNColorPalette::~FNColorPalette()
+{
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// FNHSVPalette
+//-----------------------------------------------------------------------------
+FNHSVPalette::FNHSVPalette(QWidget* parent, const char* name, WFlags fl)
+:FNPaletteBase(parent, name, fl), _hue(0)
+{
+}
+
+FNHSVPalette::~FNHSVPalette()
+{
+}
+
+void FNHSVPalette::hueChanged(int v)
+{
+ _hue = v;
+ redraw();
+}
+
+void FNHSVPalette::drawImpl(QPainter& pa)
+{
+ //描画実装
+ //HSVカラーパレットを描画
+ int wd = width();
+ int ht = height();
+ if (wd > 0 && ht > 0) {
+ QColor c;
+ double xs = (double)wd / 255.0;
+ double ys = (double)ht / 255.0;
+ for (int i = 0; i < 256; i += 32) {
+ int x1 = (int)((double)i * xs);
+ int x2 = (int)((double)(i + 32) * xs);
+ int w = x2 - x1;
+ if (1 > w) {
+ w = 1;
+ }
+ for (int j = 0; j <= 256; j += 32) {
+ int y1 = (int)((double)j * ys);
+ int y2 = (int)((double)(j + 32) * ys);
+ int h = y2 - y1;
+ if (1 > h) {
+ h = 1;
+ }
+ c.setHsv(_hue, 255 - j, 255 - i);
+ pa.fillRect(x1, y1, w, h, QBrush(c));
+ }
+ }
+ }
+ pa.flush();
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// FNColorDialog
+//-----------------------------------------------------------------------------
+FNColorDialog::FNColorDialog(QWidget* parent, const char* name, WFlags f)
+:QDialog(parent, name, true, f), _isblock(false)
+{
+ resize(200, 200);
+ QVBoxLayout* mainlayout = new QVBoxLayout(this);
+ setCaption("Color Selector");
+ mainlayout->setMargin(2);
+ mainlayout->setSpacing(2);
+ setSizeGripEnabled(true);
+ //基本パレット
+ int p = 0;
+ _base[p++] = new FNColorPalette(QColor(0, 0, 0), this);
+ _base[p++] = new FNColorPalette(QColor(0, 0, 255), this);
+ _base[p++] = new FNColorPalette(QColor(255, 0, 0), this);
+ _base[p++] = new FNColorPalette(QColor(255, 0, 255), this);
+ _base[p++] = new FNColorPalette(QColor(0, 255, 0), this);
+ _base[p++] = new FNColorPalette(QColor(0, 255, 255), this);
+ _base[p++] = new FNColorPalette(QColor(255, 255, 0), this);
+ _base[p++] = new FNColorPalette(QColor(255, 255, 255), this);
+ _base[p++] = new FNColorPalette(QColor(128, 128, 128), this);
+ _base[p++] = new FNColorPalette(QColor(0, 0, 128), this);
+ _base[p++] = new FNColorPalette(QColor(128, 0, 0), this);
+ _base[p++] = new FNColorPalette(QColor(128, 0, 128), this);
+ _base[p++] = new FNColorPalette(QColor(0, 128, 0), this);
+ _base[p++] = new FNColorPalette(QColor(0, 128, 128), this);
+ _base[p++] = new FNColorPalette(QColor(128, 128, 0), this);
+ _base[p++] = new FNColorPalette(QColor(200, 200, 200), this);
+
+ QGridLayout* baselayout = new QGridLayout(this, 2, 16);
+ baselayout->setMargin(0);
+ baselayout->setSpacing(0);
+ p = 0;
+ for (int i = 0; i < 2; ++i) {
+ for (int j = 0; j < 8; ++j) {
+ baselayout->addWidget(_base[p], i, j);
+ connect(_base[p], SIGNAL(clicked(FNPaletteBase*)), this, SLOT(basePaletteClicked(FNPaletteBase*)));
+ _base[p]->resize(24, 24);
+ _base[p]->setMaximumSize(24, 24);
+ _base[p]->setMinimumSize(24, 24);
+ p++;
+ }
+ }
+ mainlayout->addLayout(baselayout);
+
+ //HUE
+ _hue = new QSlider(Horizontal, this);
+ _hue->setMinValue(0);
+ _hue->setMaxValue(360);
+ _hue->setLineStep(1);
+ _hue->setPageStep(60);
+ _hue->setValue(0);
+ //sliderReleased
+ mainlayout->addWidget(_hue);
+
+ //HSVパレット
+ QHBoxLayout* hsvlayout = new QHBoxLayout(this);
+ hsvlayout->setMargin(0);
+ hsvlayout->setSpacing(2);
+ _palette = new FNHSVPalette(this);
+ _palette->setMinimumSize(90, 100);
+ hsvlayout->addWidget(_palette);
+ connect(_palette, SIGNAL(clicked(FNPaletteBase*)), this, SLOT(hsvPaletteClicked(FNPaletteBase*)));
+
+ //選択色
+ QGridLayout* selectLayout = new QGridLayout(this, 4, 4);
+ _select = new FNColorPalette(black, this);
+ _select->resize(48, 32);
+ _select->setMinimumSize(48, 32);
+ _select->setMaximumSize(32767, 32);
+ selectLayout->addMultiCellWidget(_select, 0, 0, 1, 3);
+
+ //RGBコントローラ
+ selectLayout->addWidget(new QLabel("R:", this), 1, 0);
+ _r = new QSpinBox(0, 255, 1, this);
+ _r->setValue(0);
+ selectLayout->addMultiCellWidget(_r, 1, 1, 1, 3);
+
+ selectLayout->addWidget(new QLabel("G:", this), 2, 0);
+ _g = new QSpinBox(0, 255, 1, this);
+ _g->setValue(0);
+ selectLayout->addMultiCellWidget(_g, 2, 2, 1, 3);
+
+ selectLayout->addWidget(new QLabel("B:", this), 3, 0);
+ _b = new QSpinBox(0, 255, 1, this);
+ _b->setValue(0);
+ selectLayout->addMultiCellWidget(_b, 3, 3, 1, 3);
+
+ hsvlayout->addLayout(selectLayout);
+ mainlayout->addLayout(hsvlayout);
+
+ connect(_hue, SIGNAL(valueChanged(int)), _palette, SLOT(hueChanged(int)));
+ connect(_r, SIGNAL(valueChanged(int)), this, SLOT(rgbChanged(int)));
+ connect(_g, SIGNAL(valueChanged(int)), this, SLOT(rgbChanged(int)));
+ connect(_b, SIGNAL(valueChanged(int)), this, SLOT(rgbChanged(int)));
+}
+
+FNColorDialog::~FNColorDialog()
+{
+}
+
+void FNColorDialog::rgbChanged(int)
+{
+ int r = _r->value();
+ int g = _g->value();
+ int b = _b->value();
+ setColor(QColor(r, g, b));
+}
+
+QColor FNColorDialog::color() const
+{
+ return _select->color();
+}
+void FNColorDialog::setColor(QColor c)
+{
+ if (_isblock) {
+ return;
+ }
+ _isblock = true;
+
+ int r;
+ int g;
+ int b;
+
+ c.rgb(&r, &g, &b);
+ _r->setValue(r);
+ _g->setValue(g);
+ _b->setValue(b);
+ _select->setBGColor(c);
+ _isblock = false;
+}
+
+void FNColorDialog::basePaletteClicked(FNPaletteBase* btn)
+{
+ setColor(btn->color());
+ accept();
+}
+
+void FNColorDialog::hsvPaletteClicked(FNPaletteBase* btn)
+{
+ setColor(btn->color());
+}
diff --git a/microkde/fncolordialog.h b/microkde/fncolordialog.h
new file mode 100755
index 0000000..615d2ed
--- a/dev/null
+++ b/microkde/fncolordialog.h
@@ -0,0 +1,137 @@
+/* this program for Sharp SLA300, B500, C7x0, C860 Linux PDA
+ Copyright (C) 2003-2005 Joe Kanemori.<kanemori@ymg.urban.ne.jp>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundatibannwaon; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ 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
+*/
+/*
+2005/02/27 FreeNote 1.11.10pre
+・PDFの出力形式を一部変更
+・インポート時のバグfix
+
+*/
+#ifndef FNPALETTEDIALOG_H
+#define FNPALETTEDIALOG_H
+#include <qwidget.h>
+#include <qpixmap.h>
+#include <qpainter.h>
+#include <qcolor.h>
+#include <qdialog.h>
+#include <qlayout.h>
+#include <qslider.h>
+#include <qspinbox.h>
+
+//-----------------------------------------------------------------------------
+// FNPaletteBase
+//-----------------------------------------------------------------------------
+class Q_EXPORT FNPaletteBase : public QWidget
+{
+ Q_OBJECT
+public:
+
+ FNPaletteBase(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+
+
+ virtual ~FNPaletteBase();
+
+
+ void setBGColor(QColor c) {
+ bgcolor_ = c;
+ selection_ = c;
+ redraw();
+ };
+ QColor color() const {
+ return selection_;
+ };
+
+protected:
+ virtual void paintEvent(QPaintEvent*);
+ virtual void resizeEvent(QResizeEvent* evt);
+ virtual void redraw(bool force=false);
+ virtual void drawImpl(QPainter& pa);
+ virtual void mouseReleaseEvent(QMouseEvent* evt);
+ virtual bool pickColor(int x, int y);
+ QColor selection_;
+private:
+ QPixmap wbuf_;
+ QColor bgcolor_;
+ bool _isblock;
+
+signals:
+ void clicked(FNPaletteBase* sender);
+};
+
+
+
+
+//-----------------------------------------------------------------------------
+// FNColorPalette
+//-----------------------------------------------------------------------------
+class Q_EXPORT FNColorPalette : public FNPaletteBase
+{
+ Q_OBJECT
+public:
+ FNColorPalette(QColor c, QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ virtual ~FNColorPalette();
+};
+
+
+
+
+//-----------------------------------------------------------------------------
+// FNHSVPalette
+//-----------------------------------------------------------------------------
+class Q_EXPORT FNHSVPalette : public FNPaletteBase
+{
+ Q_OBJECT
+public:
+ FNHSVPalette(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ virtual ~FNHSVPalette();
+public slots:
+ void hueChanged(int v);
+protected:
+ virtual void drawImpl(QPainter& pa);
+ int _hue;
+};
+
+
+
+
+//-----------------------------------------------------------------------------
+// FNColorDialog
+//-----------------------------------------------------------------------------
+class Q_EXPORT FNColorDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ FNColorDialog(QWidget* parent=0, const char* name=0, WFlags f=0);
+ virtual ~FNColorDialog();
+ void setColor(QColor c);
+ QColor color() const;
+public slots:
+ virtual void basePaletteClicked(FNPaletteBase*);
+ virtual void hsvPaletteClicked(FNPaletteBase*);
+ void rgbChanged(int);
+private:
+ FNHSVPalette* _palette;
+ FNColorPalette* _base[16];
+ QSlider* _hue;
+ FNColorPalette* _select;
+ QSpinBox* _r;
+ QSpinBox* _g;
+ QSpinBox* _b;
+ bool _isblock;
+
+};
+#endif //FNPALETTEDIALOG_H
diff --git a/microkde/kcolordialog.cpp b/microkde/kcolordialog.cpp
index a3d8973..b9bb5bb 100644
--- a/microkde/kcolordialog.cpp
+++ b/microkde/kcolordialog.cpp
@@ -1,93 +1,19 @@
#include "kcolordialog.h"
#include <qdialog.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qslider.h>
#include <qhbox.h>
#include <qapplication.h>
#include <qpushbutton.h>
#include <kglobal.h>
QColor KColorDialog::getColor( ) const
{
- QColor c ( r->value(), g->value(), b->value() );
- lar->setText ( "R: " + QString::number ( c.red() ) );
- lag->setText ( "G: " + QString::number ( c.green() ) );
- lab->setText ( "B: " + QString::number ( c.blue() ) );
- return c;
+ return color();
}
-void KColorDialog::setColor( const QColor & d )
-{
- r->setValue(d.red() );
- g->setValue(d.green() );
- b->setValue(d.blue() );
- old_color->setPalette( QPalette( d.dark(), d ) );
- lar->setText ( "R: " + QString::number ( d.red() ) );
- lag->setText ( "G: " + QString::number ( d.green() ) );
- lab->setText ( "B: " + QString::number ( d.blue() ) );
-
-}
-KColorDialog::KColorDialog( QWidget *p ):QDialog( p, "input-dialog", true )
-{
- setCaption( i18n("Choose Color") );
-
- setMaximumSize( QApplication::desktop()->width() - 20, QApplication::desktop()->height() - 40 ); // for zaurus 5500er.
- QGridLayout* lay = new QGridLayout ( this, 4, 2 );
- lay->setSpacing( 6 );
- lay->setMargin( 11 );
-
- old_color = new QLabel("Old color",this);
- old_color->setFrameStyle( QFrame::Panel | QFrame::Plain );
- old_color->setLineWidth( 1 );
- lay->addWidget(old_color, 0, 0);
-
- new_color = new QLabel("New color", this);
- new_color->setFrameStyle( QFrame::Panel | QFrame::Plain );
- new_color->setLineWidth( 1 );
- lay->addWidget(new_color, 0, 1);
- new_color->setAlignment( AlignCenter );
- QHBox* hb = new QHBox ( this );
- lar = new QLabel( hb );
- lag = new QLabel( hb );
- lab = new QLabel( hb );
- lay->addMultiCellWidget( hb,1,1, 0,1 );
-
- QLabel* lr = new QLabel ( "Red:", this );
- lay->addWidget( lr,2,0 );
- r = new QSlider ( 0, 255, 1, 1, Horizontal, this );
- lay->addWidget(r ,2,1 );
-
- QLabel* lg = new QLabel( "Green:",this );
- lay->addWidget(lg ,3,0 );
- g = new QSlider ( 0, 255, 1, 1, Horizontal, this );
- lay->addWidget( g ,3,1 );
-
- QLabel* lb = new QLabel ( "Blue:",this );
- lay->addWidget( lb,4,0 );
- b = new QSlider ( 0, 255, 1, 1, Horizontal, this );
- lay->addWidget(b ,4,1 );
-
- QColor d = backgroundColor();
- r->setValue(d.red() );
- g->setValue(d.green() );
- b->setValue(d.blue() );
- old_color->setPalette( QPalette( d.dark() , d ) );
- // kannst du wieder reinnehmen, aber es geht auch so.
- QPushButton * ok = new QPushButton (i18n(" OK "), this );
- ok->setDefault( true );
- QPushButton * cancel = new QPushButton (i18n(" Cancel "), this );
-
- lay->addWidget(ok ,5,0 );
- lay->addWidget(cancel ,5,1 );
- connect (ok, SIGNAL( clicked() ), this ,SLOT (accept() ));
- connect (cancel, SIGNAL( clicked() ), this ,SLOT (reject() ));
- connect (r, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) ));
- connect (g, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) ));
- connect (b, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) ));
-}
-void KColorDialog::updateColor( int )
+KColorDialog::KColorDialog( QWidget *p ):FNColorDialog( p, "input-dialog" )
{
- QColor c = getColor( ) ;
- new_color->setPalette( QPalette( c.dark(), c ) );
+
}
diff --git a/microkde/kcolordialog.h b/microkde/kcolordialog.h
index bb2045d..0858352 100644
--- a/microkde/kcolordialog.h
+++ b/microkde/kcolordialog.h
@@ -1,25 +1,20 @@
#ifndef MINIKDE_KCOLORDIALOG_H
#define MINIKDE_KCOLORDIALOG_H
#include <qcolor.h>
#include <qdialog.h>
#include <qslider.h>
#include <qlabel.h>
-class KColorDialog : public QDialog
+#include <fncolordialog.h>
+
+class KColorDialog : public FNColorDialog
{
Q_OBJECT
public:
KColorDialog( QWidget *p );
- QColor getColor( ) const;
- void setColor( const QColor &);
- private:
- QSlider *r, *g, *b;
- QLabel * old_color, *new_color;
- QLabel *lar, *lag, *lab;
-private slots:
- void updateColor( int );
+ QColor getColor( ) const;
};
#endif
diff --git a/microkde/microkdeE.pro b/microkde/microkdeE.pro
index c54fb22..335fcd0 100644
--- a/microkde/microkdeE.pro
+++ b/microkde/microkdeE.pro
@@ -1,172 +1,172 @@
TEMPLATE = lib
CONFIG += qt warn_on
INCLUDEPATH += . .. $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/kabc kdecore kdeui kio/kfile kio/kio $(QPEDIR)/include
DEPENDPATH += $(QPEDIR)/include
LIBS += -lmicroqtcompat -L$(QPEDIR)/lib
DEFINES += KDE_QT_ONLY
TARGET = microkde
OBJECTS_DIR = obj/$(PLATFORM)
MOC_DIR = moc/$(PLATFORM)
DESTDIR=$(QPEDIR)/lib
INTERFACES = \
HEADERS = \
-qlayoutengine_p.h \
+qlayoutengine_p.h fncolordialog.h\
KDGanttMinimizeSplitter.h \
kapplication.h \
kaudioplayer.h \
kcalendarsystem.h \
kcalendarsystemgregorian.h \
kcolorbutton.h \
kcolordialog.h \
kcombobox.h \
kconfig.h \
kdatetbl.h \
kdebug.h \
kdialog.h \
kdialogbase.h \
keditlistbox.h \
kemailsettings.h \
kfiledialog.h \
kfontdialog.h \
kglobal.h \
kglobalsettings.h \
kiconloader.h \
klineedit.h \
klineeditdlg.h \
kmessagebox.h \
knotifyclient.h \
kprinter.h \
kprocess.h \
krestrictedline.h \
krun.h \
ksimpleconfig.h \
kstaticdeleter.h \
ksystemtray.h \
ktempfile.h \
ktextedit.h \
kunload.h \
kurl.h \
ofileselector_p.h \
ofontselector.h \
kdeui/kguiitem.h \
kdeui/kaction.h \
kdeui/kactionclasses.h \
kdeui/kactioncollection.h \
kdeui/kcmodule.h \
kdeui/kstdaction.h \
kdeui/kbuttonbox.h \
kdeui/klistbox.h \
kdeui/klistview.h \
kdeui/kjanuswidget.h \
kdeui/kseparator.h \
kdeui/kmainwindow.h \
kdeui/knuminput.h \
kdeui/knumvalidator.h \
kdeui/ksqueezedtextlabel.h \
kdeui/ktoolbar.h \
kdeui/ktoolbarbutton.h \
kdeui/ktoolbarhandler.h \
kdeui/kxmlguiclient.h \
kio/job.h \
kio/kio/kdirwatch.h \
kio/kio/kdirwatch_p.h \
kio/kfile/kurlrequester.h \
kresources/resource.h \
kresources/factory.h \
kresources/managerimpl.h \
kresources/manager.h \
kresources/selectdialog.h \
kresources/configpage.h \
kresources/configwidget.h \
kresources/configdialog.h \
kresources/kcmkresources.h \
kdecore/kmdcodec.h \
kdecore/kconfigbase.h \
kdecore/klocale.h \
kdecore/klibloader.h \
kdecore/kcatalogue.h \
kdecore/kprefs.h \
kdecore/ksharedptr.h \
kdecore/kshell.h \
kdecore/kstandarddirs.h \
kdecore/kstringhandler.h \
kdecore/kshortcut.h \
kutils/kcmultidialog.h \
kidmanager.h
SOURCES = \
-KDGanttMinimizeSplitter.cpp \
+KDGanttMinimizeSplitter.cpp fncolordialog.cpp \
kapplication.cpp \
kcalendarsystem.cpp \
kcalendarsystemgregorian.cpp \
kcolorbutton.cpp \
kcolordialog.cpp \
kconfig.cpp \
kdatetbl.cpp \
kdialog.cpp \
kdialogbase.cpp \
keditlistbox.cpp \
kemailsettings.cpp \
kfontdialog.cpp \
kfiledialog.cpp \
kglobal.cpp \
kglobalsettings.cpp \
kiconloader.cpp \
kmessagebox.cpp \
kprocess.cpp \
krun.cpp \
ksystemtray.cpp \
ktempfile.cpp \
kurl.cpp \
ktextedit.cpp \
ofileselector_p.cpp \
ofontselector.cpp \
kdecore/kcatalogue.cpp \
kdecore/klibloader.cpp \
kdecore/klocale.cpp \
kdecore/kmdcodec.cpp \
kdecore/kprefs.cpp \
kdecore/kshell.cpp \
kdecore/kstandarddirs.cpp \
kdecore/kstringhandler.cpp \
kdeui/kaction.cpp \
kdeui/kactionclasses.cpp \
kdeui/kactioncollection.cpp \
kdeui/kbuttonbox.cpp \
kdeui/kcmodule.cpp \
kdeui/kguiitem.cpp \
kdeui/kjanuswidget.cpp \
kdeui/klistbox.cpp \
kdeui/klistview.cpp \
kdeui/kmainwindow.cpp \
kdeui/knuminput.cpp \
kdeui/knumvalidator.cpp \
kdeui/kseparator.cpp \
kdeui/kstdaction.cpp \
kdeui/ksqueezedtextlabel.cpp \
kdeui/ktoolbar.cpp \
kdeui/ktoolbarbutton.cpp \
kdeui/ktoolbarhandler.cpp \
kdeui/kxmlguiclient.cpp \
kio/kfile/kurlrequester.cpp \
kio/kio/kdirwatch.cpp \
kresources/configpage.cpp \
kresources/configdialog.cpp \
kresources/configwidget.cpp \
kresources/factory.cpp \
kresources/kcmkresources.cpp \
kresources/managerimpl.cpp \
kresources/resource.cpp \
kresources/selectdialog.cpp \
kutils/kcmultidialog.cpp \
kidmanager.cpp