[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kexi/kexiutils
From: Jaroslaw Staniek <js () iidea ! pl>
Date: 2007-10-19 21:10:19
Message-ID: 1192828219.003734.13712.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 727133 by staniek:
Kexi Utils
- fixed tool buttons behaviour
M +2 -2 SmallToolButton.cpp
M +31 -11 utils.cpp
M +18 -3 utils.h
--- trunk/koffice/kexi/kexiutils/SmallToolButton.cpp #727132:727133
@@ -222,8 +222,8 @@
.arg(checked).arg(d->action ? d->action->text() : QString())
.arg(view ? view->objectName() : QString("??") );
d->enableSlotActionToggled = false;
- if (d->action)
- d->action->setChecked(checked);
+// if (d->action)
+// d->action->setChecked(checked);
d->enableSlotActionToggled = true;
}
--- trunk/koffice/kexi/kexiutils/utils.cpp #727132:727133
@@ -21,22 +21,23 @@
#include "utils_p.h"
#include "kexiutils_global.h"
-#include <qregexp.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qwmatrix.h>
-#include <qicon.h>
+#include <QRegExp>
+#include <QPainter>
+#include <QImage>
+#include <QIcon>
#include <QMetaProperty>
#include <QBitmap>
#include <QFocusEvent>
-#include <qfile.h>
+#include <QFile>
+#include <QStyle>
-#include <kdebug.h>
-#include <kcursor.h>
-#include <kapplication.h>
-#include <kiconeffect.h>
-#include <kiconloader.h>
+#include <KDebug>
+#include <KCursor>
+#include <KApplication>
+#include <KIconEffect>
+#include <KIconLoader>
#include <KGlobalSettings>
+#include <KAction>
using namespace KexiUtils;
@@ -653,4 +654,23 @@
return d->set->contains(string);
}
+//---------------------
+
+KTextEditorFrame::KTextEditorFrame( QWidget * parent, Qt::WindowFlags f )
+ : QFrame(parent, f)
+{
+ QEvent dummy(QEvent::StyleChange);
+ changeEvent(&dummy);
+};
+
+void KTextEditorFrame::changeEvent(QEvent *event)
+{
+ if (event->type()==QEvent::StyleChange) {
+ if (style()->objectName()!="oxygen") // oxygen already nicely paints the frame
+ setFrameStyle(QFrame::Sunken|QFrame::StyledPanel);
+ else
+ setFrameStyle(QFrame::NoFrame);
+ }
+}
+
#include "utils_p.moc"
--- trunk/koffice/kexi/kexiutils/utils.h #727132:727133
@@ -27,12 +27,14 @@
#include <QDateTime>
#include <QMetaMethod>
#include <QFont>
+#include <QFrame>
#include <KMimeType>
#include <kiconloader.h>
class QColor;
class QMetaProperty;
+class KAction;
//! @short General Utils
namespace KexiUtils
@@ -345,7 +347,8 @@
//! @short Autodeleted hash
template <class Key, class T>
- class KEXIUTILS_EXPORT AutodeletedHash : public QHash<Key, T> {
+ class KEXIUTILS_EXPORT AutodeletedHash : public QHash<Key, T>
+ {
public:
AutodeletedHash(const AutodeletedHash& other) : QHash<Key, T>(other), m_autoDelete(false) {}
AutodeletedHash(bool autoDelete = true) : QHash<Key, T>(), m_autoDelete(autoDelete) {}
@@ -358,7 +361,8 @@
//! @short Autodeleted list
template <typename T>
- class KEXIUTILS_EXPORT AutodeletedList : public QList<T> {
+ class KEXIUTILS_EXPORT AutodeletedList : public QList<T>
+ {
public:
AutodeletedList(const AutodeletedList& other)
: QList<T>(other), m_autoDelete(false) {}
@@ -427,7 +431,8 @@
//! @short Case insensitive hash container supporting QString or QByteArray keys.
//! Keys are turned to lowercase before inserting. Also supports option for autodeletion.
template <typename Key, typename T>
- class KEXIUTILS_EXPORT CaseInsensitiveHash : public QHash<Key, T> {
+ class KEXIUTILS_EXPORT CaseInsensitiveHash : public QHash<Key, T>
+ {
public:
CaseInsensitiveHash() : QHash<Key, T>(), m_autoDelete(false) {}
~CaseInsensitiveHash() { if (m_autoDelete) qDeleteAll(*this); }
@@ -469,6 +474,16 @@
class Private;
Private * const d;
};
+
+ /*! A modified QFrame which sets up sunken styled panel frame style depending
+ on the current widget style. The widget also reacts on style changes. */
+ class KEXIUTILS_EXPORT KTextEditorFrame : public QFrame
+ {
+ public:
+ KTextEditorFrame( QWidget * parent = 0, Qt::WindowFlags f = 0 );
+ protected:
+ virtual void changeEvent(QEvent *event);
+ };
}
//! sometimes we leave a space in the form of empty QFrame and want to insert here
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic