[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kexi
From: Jarosław Staniek <staniek () kde ! org>
Date: 2009-10-31 2:00:59
Message-ID: 1256954459.052995.20833.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1042903 by staniek:
Forms
*fix cursor handling in data and design modes
M +2 -2 formeditor/FormWidgetInterface.cpp
M +2 -2 formeditor/factories/stdwidgetfactory.cpp
M +2 -2 formeditor/form.cpp
M +1 -1 formeditor/utils.cpp
M +9 -0 plugins/forms/kexiformview.cpp
M +2 -2 plugins/forms/widgets/kexidbform.cpp
M +1 -1 plugins/forms/widgets/kexidbform.h
M +1 -1 plugins/forms/widgets/kexidbtextedit.cpp
--- trunk/koffice/kexi/formeditor/FormWidgetInterface.cpp #1042902:1042903
@@ -51,8 +51,8 @@
d->design = design;
if (design)
dynamic_cast<QWidget*>(this)->setCursor(QCursor(Qt::ArrowCursor));
- else
- dynamic_cast<QWidget*>(this)->unsetCursor();
+/* else
+ dynamic_cast<QWidget*>(this)->unsetCursor();*/
}
bool FormWidgetInterface::editingMode() const
--- trunk/koffice/kexi/formeditor/factories/stdwidgetfactory.cpp #1042902:1042903
@@ -491,8 +491,8 @@
w = new KexiPictureLabel(DesktopIcon("image-x-generic"), p);
else if (c == "KLineEdit") {
w = new KLineEdit(p);
- if (designMode)
- w->setCursor(QCursor(Qt::ArrowCursor));
+//2.0 if (designMode)
+//2.0 w->setCursor(QCursor(Qt::ArrowCursor));
} else if (c == "KPushButton")
w = new KPushButton(/*i18n("Button")*/text, p);
--- trunk/koffice/kexi/formeditor/form.cpp #1042902:1042903
@@ -3610,13 +3610,13 @@
return;
}
tree->eventEater()->setContainer(d->inlineEditorContainer);
- if (widget) {// && !ed)
+/*2.0 if (widget) {// && !ed)
setRecursiveCursor(widget, this);
if (widget->inherits("QLineEdit") || widget->inherits("QTextEdit")) { \
//fix weird behaviour // widget->unsetCursor();
widget->setCursor(Qt::ArrowCursor);
}
- }
+ }*/
// disable again the widget if needed
if (!ed && !tree->isEnabled()) {
--- trunk/koffice/kexi/formeditor/utils.cpp #1042902:1042903
@@ -67,7 +67,7 @@
// << "directed to" << container->objectName();
object->installEventFilter(container);
//2.0 if (((QWidget*)object)->testAttribute(Qt::WA_SetCursor))
- ((QWidget*)object)->setCursor(QCursor(Qt::ArrowCursor));
+//2.0 ((QWidget*)object)->setCursor(QCursor(Qt::ArrowCursor));
const QObjectList list(object->children());
foreach(QObject *obj, list) {
--- trunk/koffice/kexi/plugins/forms/kexiformview.cpp #1042902:1042903
@@ -257,6 +257,7 @@
pal.setBrush(QPalette::Window, palette().brush(QPalette::Window));
m_dbform->setPalette(pal); // avoid inheriting QPalette::Window role
// from m_scrollView->viewport()
+
// m_dbform->resize( m_scrollView->viewport()->size() - QSize(20, 20) );
// m_dbform->resize(QSize(400, 300));
m_scrollView->setWidget(m_dbform);
@@ -384,6 +385,14 @@
if (!newForm && viewMode() == Kexi::DesignViewMode) {
form()->clearUndoStack();
}
+
+/* QList<QWidget*> wlist(m_dbform->findChildren<QWidget*>());
+ wlist.prepend(m_dbform);
+ foreach(QWidget* w, wlist) {
+ KFormDesigner::FormWidgetInterface* fwiface = \
dynamic_cast<KFormDesigner::FormWidgetInterface*>(w); + if (fwiface)
+ fwiface->setDesignMode(viewMode() == Kexi::DesignViewMode);
+ }*/
}
void KexiFormView::updateAutoFieldsDataSource()
--- trunk/koffice/kexi/plugins/forms/widgets/kexidbform.cpp #1042902:1042903
@@ -735,7 +735,7 @@
emit handleDropEvent(e);
}
-void KexiDBForm::setCursor(const QCursor & cursor)
+/*void KexiDBForm::setCursor(const QCursor & cursor)
{
//js: empty, to avoid fscking problems with random cursors!
//! @todo?
@@ -743,7 +743,7 @@
if (form() && form()->state() == KFormDesigner::Form::WidgetInserting) { \
//exception KexiDBFormBase::setCursor(cursor);
}
-}
+}*/
//! @todo: Qt4? XORed resize rectangles instead of black widgets
/*
--- trunk/koffice/kexi/plugins/forms/widgets/kexidbform.h #1042902:1042903
@@ -103,7 +103,7 @@
bool preview() const;
- virtual void setCursor(const QCursor & cursor);
+// virtual void setCursor(const QCursor & cursor);
public slots:
void setAutoTabStops(bool set);
--- trunk/koffice/kexi/plugins/forms/widgets/kexidbtextedit.cpp #1042902:1042903
@@ -40,7 +40,7 @@
tmpFont.setPointSize(KGlobalSettings::smallestReadableFont().pointSize());
setMinimumHeight(QFontMetrics(tmpFont).height() + 6);
connect(this, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
- installEventFilter(this);
+// installEventFilter(this);
}
KexiDBTextEdit::~KexiDBTextEdit()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic