80 (*it)->d_func()->group =
nullptr;
98 if (
d->stack_list.contains(stack))
100 d->stack_list.append(stack);
103 other->removeStack(stack);
104 stack->d_func()->group =
this;
118 if (
d->stack_list.removeAll(stack) == 0)
120 if (stack ==
d->active)
122 stack->d_func()->group =
nullptr;
134 return d->stack_list;
154 if (
d->active == stack)
157 if (
d->active !=
nullptr) {
174 if (
d->active ==
nullptr) {
242 QString effectivePrefix = prefix;
245 effectivePrefix =
tr(
"Undo %1");
246 defaultText =
tr(
"Undo",
"Default text for undo action");
249 QUndoStackPrivate::setPrefixedText(action, effectivePrefix, defaultText,
undoText());
253 QUndoStackPrivate::setPrefixedText(action, effectivePrefix, defaultText,
text);
280 QString effectivePrefix = prefix;
283 effectivePrefix =
tr(
"Redo %1");
284 defaultText =
tr(
"Redo",
"Default text for redo action");
287 QUndoStackPrivate::setPrefixedText(action, effectivePrefix, defaultText,
redoText());
291 QUndoStackPrivate::setPrefixedText(action, effectivePrefix, defaultText,
text);
311 if (
d->active !=
nullptr)
328 if (
d->active !=
nullptr)
344 return d->active !=
nullptr &&
d->active->canUndo();
359 return d->active !=
nullptr &&
d->active->canRedo();
374 return d->active ==
nullptr ?
QString() :
d->active->undoText();
389 return d->active ==
nullptr ?
QString() :
d->active->redoText();
404 return d->active ==
nullptr ||
d->active->isClean();
479#include "moc_qundogroup.cpp"
The QAction class provides an abstraction for user commands that can be added to different user inter...
void triggered(bool checked=false)
This signal is emitted when an action is activated by the user; for example, when the user clicks a m...
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QList< QUndoStack * > stack_list
The QUndoGroup class is a group of QUndoStack objects.
void canUndoChanged(bool canUndo)
This signal is emitted whenever the active stack emits QUndoStack::canUndoChanged() or the active sta...
void addStack(QUndoStack *stack)
Adds stack to this group.
void cleanChanged(bool clean)
This signal is emitted whenever the active stack emits QUndoStack::cleanChanged() or the active stack...
QUndoStack * activeStack() const
Returns the active stack of this group.
void redoTextChanged(const QString &redoText)
This signal is emitted whenever the active stack emits QUndoStack::redoTextChanged() or the active st...
~QUndoGroup()
Destroys the QUndoGroup.
QUndoGroup(QObject *parent=nullptr)
Creates an empty QUndoGroup object with parent parent.
bool isClean() const
Returns the value of the active stack's QUndoStack::isClean().
QAction * createRedoAction(QObject *parent, const QString &prefix=QString()) const
Creates an redo QAction object with parent parent.
void removeStack(QUndoStack *stack)
Removes stack from this group.
bool canRedo() const
Returns the value of the active stack's QUndoStack::canRedo().
QList< QUndoStack * > stacks() const
Returns a list of stacks in this group.
QString undoText() const
Returns the value of the active stack's QUndoStack::undoText().
void canRedoChanged(bool canRedo)
This signal is emitted whenever the active stack emits QUndoStack::canRedoChanged() or the active sta...
QAction * createUndoAction(QObject *parent, const QString &prefix=QString()) const
Creates an undo QAction object with parent parent.
void undo()
Calls QUndoStack::undo() on the active stack.
void undoTextChanged(const QString &undoText)
This signal is emitted whenever the active stack emits QUndoStack::undoTextChanged() or the active st...
void setActiveStack(QUndoStack *stack)
Sets the active stack of this group to stack.
void activeStackChanged(QUndoStack *stack)
This signal is emitted whenever the active stack of the group changes.
bool canUndo() const
Returns the value of the active stack's QUndoStack::canUndo().
QString redoText() const
Returns the value of the active stack's QUndoStack::redoText().
void indexChanged(int idx)
This signal is emitted whenever the active stack emits QUndoStack::indexChanged() or the active stack...
void redo()
Calls QUndoStack::redo() on the active stack.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
myObject disconnect()
[26]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent