[Qt-interest] Undo / Redo support on QTableWidget
Malyushytsky, Alex
alex at wai.com
Fri Aug 14 22:40:55 CEST 2009
>From QT documentation:
"Qt's Undo Framework is an implementation of the Command pattern, for implementing undo/redo functionality in applications.
The Command pattern is based on the idea that all editing in an application is done by creating instances of command objects. Command objects apply changes to the document and are stored on a command stack. Furthermore, each command knows how to undo its changes to bring the document back to its previous state."
But it is you who should be able to write the command to redo/undo the state of your document.
QT will not do it for you. What it does it stores the command for you and allows user to activate them, removes not needed commands anymore.
The simplest approach is to generate command which saves state of the whole document (QTableWidget?) (if it is not too big).
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Santhosh Y
Sent: Thursday, August 13, 2009 11:05 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Undo / Redo support on QTableWidget
Hi,
Is undo / redo supported on QTableWidget in Qt by default.
I have a requirement that, from clipboard few cells can be copied to and
undo / redo should show or delete them.
Is this possible int Qt's Qtablewidget OR we have to support this on our
own.
I have seen the undo frame support in Qt. Is this useful for
implementing such a feature I mentioned above?
Please suggest me some body how difficult is this task to implement on
QTableWidget.
Thanks,
----------------------------------------------------
Y Santhosh Kumar
Senior Software Engineer
SoftJin Technologies Private Limited
Unit No. 102, Mobius Tower,
I Floor, SJR I - Park,
EPIP, White Field,
Bangalore - 560066, India
U : www.softjin.com
E : santhosh at softjin.com
T : +91-80-41779999
M : +91-9740535265
----------------------------------------------------
Business Disclaimer
____________________________________________________________
This e-mail message and any files transmitted with it are intended solely
for the use of the individual or entity to which they are addressed. It
may contain confidential, proprietary or legally privileged information.
If you are not the intended recipient please be advised that you have
received this message in error and any use is strictly prohibited. Please
immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender by return mail. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part of
this message if you are not the intended recipient.
___________________________________________________________
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list