[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kexi
From: Jaroslaw Staniek <js () iidea ! pl>
Date: 2009-04-12 0:12:21
Message-ID: 1239495141.968571.27553.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 952478 by staniek:
Forms
- add undo and redo actions to the local toolbar
M +3 -0 core/KexiView.cpp
M +4 -0 doc/dev/CHANGELOG-Kexi-js
M +13 -6 formeditor/form.cpp
M +6 -2 formeditor/form.h
M +1 -1 formeditor/formIO.cpp
M +13 -2 plugins/forms/kexiformview.cpp
--- trunk/koffice/kexi/core/KexiView.cpp #952477:952478
@@ -665,6 +665,9 @@
btn->setText(action->text());
btn->setToolTip(action->toolTip());
btn->setWhatsThis(action->whatsThis());
+ if (action->dynamicPropertyNames().contains("iconOnly") && \
action->property("iconOnly").toBool() ) { + \
btn->setToolButtonStyle(Qt::ToolButtonIconOnly); + }
d->topBarLyr->addWidget(btn);
}
}
--- trunk/koffice/kexi/doc/dev/CHANGELOG-Kexi-js #952477:952478
@@ -25,6 +25,7 @@
- port KFDPixmapEdit, PropertyFactory
- add support for paletteForegroundColor and paletteBackgroundColor properties of \
Kexi 1.x
- add translation and simplify "textInteractionFlags" for QTextEdit and QLabel
+ - move from K3CommandHistory to the QUndo framework
TODO KoProperty:
- mising border below the last item when its editor is visible
@@ -39,6 +40,9 @@
- (the same?) Create a database -> enter the table schema editor -> add a field -> \
try to change the field type -> crash http://rafb.net/p/R4QIBR13.html
+2009-04-12
+Forms
+- add undo and redo actions to the local toolbar
2009-04-09
Core
--- trunk/koffice/kexi/formeditor/form.cpp #952477:952478
@@ -532,6 +532,7 @@
d->commandHistory = new K3CommandHistory(d->collection, true);
connect(d->commandHistory, SIGNAL(commandExecuted(K3Command*)), this, \
SLOT(slotCommandExecuted(K3Command*)));
connect(d->commandHistory, SIGNAL(documentRestored()), this, \
SLOT(slotFormRestored())); +// 2.0 not needed connect(d->commandHistory, \
SIGNAL(commandHistoryChanged()), this, SLOT(slotCommandHistoryChanged())); }
KActionCollection *Form::actionCollection() const
@@ -629,10 +630,16 @@
d->filename = file;
}
+void Form::commandHistoryDocumentSaved()
+{
+ d->commandHistory->documentSaved();
+}
+
+/* 2.0 not needed
K3CommandHistory* Form::commandHistory() const
{
return d->commandHistory;
-}
+}*/
#ifdef KFD_SIGSLOTS
ConnectionBuffer* Form::connectionBuffer() const
@@ -914,10 +921,10 @@
d->insertionPoint = p;
}
-/*KAction* Form::action(const QString& name)
+QAction* Form::action(const QString& name)
{
- return d->collection(name);
-}*/
+ return d->collection->action(name);
+}
void Form::emitActionSignals(bool withUndoAction)
{
@@ -1792,7 +1799,7 @@
// moved from FormManager
void Form::undo()
{
- if (!objectTree())
+ if (!objectTree() || !d->commandHistory->isUndoAvailable())
return;
d->commandHistory->undo();
@@ -1801,7 +1808,7 @@
// moved from FormManager
void Form::redo()
{
- if (!objectTree())
+ if (!objectTree() || !d->commandHistory->isRedoAvailable())
return;
d->isRedoing = true;
--- trunk/koffice/kexi/formeditor/form.h #952477:952478
@@ -234,8 +234,10 @@
//! @todo move this field out of this class
void setFilename(const QString &file);
- K3CommandHistory* commandHistory() const;
+// 2.0 K3CommandHistory* commandHistory() const;
+ void commandHistoryDocumentSaved();
+
#ifdef KFD_SIGSLOTS
ConnectionBuffer* connectionBuffer() const;
#endif
@@ -369,7 +371,7 @@
// void enableAction(const char* name, bool enable);
//! @return action from related action collection
-// QAction* action(const QString& name);
+ QAction* action(const QString& name);
void createPropertyCommandsInDesignMode(QWidget* widget,
const QHash<QByteArray, QVariant> \
&propValues, @@ -565,6 +567,8 @@
/*! Slot called when a buddy is chosen in the buddy list. Sets the label buddy. \
*/ //2.0: moved void buddyChosen(QAction *action);
+//2.0 void slotFormCommandHistoryChanged();
+
signals:
/*! This signal is emitted by selectWidget() when user selects a new widget,
to update both the Property Editor and the Object Tree View.
--- trunk/koffice/kexi/formeditor/formIO.cpp #952477:952478
@@ -239,7 +239,7 @@
form->connectionBuffer()->save(uiElement);
#endif
- form->commandHistory()->documentSaved();
+ form->commandHistoryDocumentSaved();
m_currentForm = 0;
m_currentItem = 0;
--- trunk/koffice/kexi/plugins/forms/kexiformview.cpp #952477:952478
@@ -181,6 +181,17 @@
//2.0 plugSharedAction("format_font", KFormDesigner::FormManager::self(), \
SLOT(changeFont())); plugSharedAction("format_font", form(), SLOT(changeFont()));
+
+ // - setup local actions
+ QList<QAction*> viewActions;
+ QAction* a;
+ a = form()->action("edit_undo");
+ a->setProperty("iconOnly", true);
+ viewActions << a;
+ a = form()->action("edit_redo");
+ a->setProperty("iconOnly", true);
+ viewActions << a;
+ setViewActions(viewActions);
}
//2.0: moved up initForm();
@@ -278,8 +289,8 @@
if (viewMode() == Kexi::DesignViewMode) {
//we want to be informed about executed commands
- connect(form()->commandHistory(), SIGNAL(commandExecuted(K3Command*)),
- form(), SLOT(slotCommandExecuted(K3Command*)));
+//2.0: moved to Form connect(form()->commandHistory(), \
SIGNAL(commandExecuted(K3Command*)), +// form(), \
SLOT(slotCommandExecuted(K3Command*))); // connect(form(), \
SIGNAL(assignAction(KFormDesigner::Form*)), // \
KexiFormManager::self(), SLOT(slotHistoryCommandExecuted(K3Command*))); }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic