extragear/graphics/kcoloredit/src

View: New views
1 Messages — Rating Filter:   Alert me  

extragear/graphics/kcoloredit/src

by Bugzilla from orgyforever@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

SVN commit 815957 by aucahuasi:

GUI:
Added clipboard option to manage the color componenets.

 M  +2 -0      CMakeLists.txt  
 M  +1 -57     itemviews/palettedelegate.cpp  
 A             widgets/clipboardlineedit.cpp   [License: UNKNOWN]
 A             widgets/clipboardlineedit.h   [License: UNKNOWN]
 M  +5 -7      widgets/colorinfo/colorinfotext.cpp  
 M  +4 -4      widgets/colorinfo/colorinfotext.h  
 A             widgets/palettedelegateeditors.cpp   [License: UNKNOWN]
 A             widgets/palettedelegateeditors.h   [License: UNKNOWN]


--- trunk/extragear/graphics/kcoloredit/src/CMakeLists.txt #815956:815957
@@ -30,6 +30,8 @@
   widgets/colorinfo/colorinfo.cpp
   widgets/colorinfo/colorinfovisual.cpp
   widgets/colorinfo/colorinfotext.cpp
+  widgets/palettedelegateeditors.cpp
+  widgets/clipboardlineedit.cpp
   widgets/multipagewidget.cpp
   widgets/kcoloreditwidget.cpp
   dialog/palettedialog.cpp
--- trunk/extragear/graphics/kcoloredit/src/itemviews/palettedelegate.cpp #815956:815957
@@ -22,66 +22,10 @@
 #include <QtCore/QModelIndex>
 #include <QtGui/QPainter>
 
-#include <QtGui/QHBoxLayout>
-
 #include <KColorScheme>
-#include <KColorButton>
-#include <KLineEdit>
 
-class ColorItemEditor : public QWidget
-{
-    public:
-        ColorItemEditor(QWidget * parent = 0)
-            : QWidget(parent)
-        {
-            m_color = new KColorButton(this);
-            m_color->setMinimumWidth(92);
+#include "palettedelegateeditors.h"
 
-            m_colorName = new KLineEdit(this);
-            m_colorName->setMinimumWidth(128);
-            m_colorName->setClearButtonShown(true);
-
-            QHBoxLayout * layout = new QHBoxLayout(this);
-            layout->addWidget(m_color);
-            layout->addWidget(m_colorName);
-
-            setMinimumHeight(40);
-        }
-
-        QColor color() const { return m_color->color(); }
-        void setColor(const QColor & color) { m_color->setColor(color); }
-
-        QString colorName() const { return m_colorName->text(); }
-        void setColorName(const QString & colorName) {     m_colorName->setText(colorName); }
-
-    private:
-        KColorButton * m_color;
-        KLineEdit * m_colorName;
-};
-
-class CommentItemEditor : public QWidget
-{
-    public:
-        CommentItemEditor(QWidget * parent = 0)
-            : QWidget(parent)
-        {
-            m_comment = new KLineEdit(this);
-            m_comment->setMinimumWidth(128);
-            m_comment->setClearButtonShown(true);
-
-            QHBoxLayout * layout = new QHBoxLayout(this);
-            layout->addWidget(m_comment);
-
-            setMinimumHeight(40);
-        }
-
-        QString comment() const { return m_comment->text(); }
-        void setComment(const QString & comment) { m_comment->setText(comment); }
-
-    private:
-        KLineEdit * m_comment;
-};
-
 PaletteDelegate::PaletteDelegate(QObject * parent)
     : QItemDelegate(parent)
 {
--- trunk/extragear/graphics/kcoloredit/src/widgets/colorinfo/colorinfotext.cpp #815956:815957
@@ -23,8 +23,9 @@
 #include <QtGui/QLabel>
 
 #include <KLocalizedString>
-#include <KLineEdit>
 
+#include "clipboardlineedit.h"
+
 //BEGIN ColorInfoText
 
 ColorInfoText::ColorInfoText(QWidget * parent) : ColorInfo(parent)
@@ -35,14 +36,11 @@
 
     m_componentName3 = new QLabel(this);
 
-    m_componentValue1 = new KLineEdit(this);
-    m_componentValue1->setReadOnly(true);
+    m_componentValue1 = new ClipboardLineEdit(this);
 
-    m_componentValue2 = new KLineEdit(this);
-    m_componentValue2->setReadOnly(true);
+    m_componentValue2 = new ClipboardLineEdit(this);
 
-    m_componentValue3 = new KLineEdit(this);
-    m_componentValue3->setReadOnly(true);
+    m_componentValue3 = new ClipboardLineEdit(this);
 
     QGridLayout * layout = new QGridLayout(this);
     layout->addWidget(m_componentName1, 0, 0, Qt::AlignLeft);
--- trunk/extragear/graphics/kcoloredit/src/widgets/colorinfo/colorinfotext.h #815956:815957
@@ -24,7 +24,7 @@
 
 class QLabel;
 
-class KLineEdit;
+class ClipboardLineEdit;
 
 class ColorInfoText : public ColorInfo
 {
@@ -43,9 +43,9 @@
         QLabel * m_componentName2;
         QLabel * m_componentName3;
 
-        KLineEdit * m_componentValue1;
-        KLineEdit * m_componentValue2;
-        KLineEdit * m_componentValue3;
+        ClipboardLineEdit * m_componentValue1;
+        ClipboardLineEdit * m_componentValue2;
+        ClipboardLineEdit * m_componentValue3;
 };
 
 class ColorInfoTextRGB : public ColorInfoText
_______________________________________________
kde-docbook mailing list
kde-docbook@...
https://mail.kde.org/mailman/listinfo/kde-docbook