Isis 3 Programmer Reference
|
History Widget for ipce. More...
#include <HistoryTreeWidget.h>
Public Member Functions | |
HistoryTreeWidget (Project *project, QWidget *parent=0) | |
Construct a history tree widget. More... | |
virtual | ~HistoryTreeWidget () |
Clean up allocated memory. More... | |
void | addToHistory (QString historyEntry) |
Add a non-workorder history to the display. More... | |
Protected Member Functions | |
int | sizeHintForColumn (int column) const |
Get the preferred size of a given column. More... | |
Private Slots | |
void | addToHistory (WorkOrder *) |
Add a single work order to the display. More... | |
void | updateProgressWidgets () |
We need to manually manage these progress widgets because QTreeWidget does a poor job of it. More... | |
void | markNotUndone (QTreeWidgetItem *) |
Display the item as not an item that has been undone - it's working or done. More... | |
void | markUndone (QTreeWidgetItem *) |
Display the item as an item that has been undone. More... | |
void | handleUndoIndexChanged (int) |
The project's undo stack has changed. More... | |
void | removeFromHistory (QObject *) |
A work order was lost... More... | |
void | showHistory () |
This resets the tree widget and re-initializes. More... | |
void | updateStatus (WorkOrder *) |
QTreeWidgetItem * | undoCommandToTreeItem (const QUndoCommand *) |
Get the QTreeWidgetItem associated with the given undo command (work order). More... | |
Private Member Functions | |
void | refit () |
This resizes the columns to an okay width for viewing all of the data cleanly. More... | |
void | updateStatus (QTreeWidgetItem *) |
Q_DISABLE_COPY (HistoryTreeWidget) | |
Private Attributes | |
QMutex | m_mutex |
Project * | m_project |
History Widget for ipce.
This widget shows the history of work orders performed on the project.
Definition at line 50 of file HistoryTreeWidget.h.
Construct a history tree widget.
project | The project to show history for |
parent | The Qt-relationship parent |
Definition at line 17 of file HistoryTreeWidget.cpp.
References addToHistory(), handleUndoIndexChanged(), refit(), showHistory(), and Isis::Project::undoStack().
|
virtual |
Clean up allocated memory.
Definition at line 43 of file HistoryTreeWidget.cpp.
void Isis::HistoryTreeWidget::addToHistory | ( | QString | historyEntry | ) |
Add a non-workorder history to the display.
(QString) | historyEntry The string displayed in the history tree |
Definition at line 165 of file HistoryTreeWidget.cpp.
References refit().
Referenced by HistoryTreeWidget(), and showHistory().
|
privateslot |
Add a single work order to the display.
This uses the QUndoCommand text (if it's blank, it uses the QAction text). If there is no text, this does nothing.
workOrder | The work order to display the history for |
Definition at line 107 of file HistoryTreeWidget.cpp.
References Isis::WorkOrder::bestText(), Isis::WorkOrder::createsCleanState(), Isis::WorkOrder::executionTime(), Isis::WorkOrder::isUndoable(), Isis::WorkOrder::progressBar(), refit(), removeFromHistory(), and updateProgressWidgets().
|
privateslot |
The project's undo stack has changed.
Display the changed states appropriately.
Definition at line 251 of file HistoryTreeWidget.cpp.
References markNotUndone(), markUndone(), undoCommandToTreeItem(), and Isis::Project::undoStack().
Referenced by HistoryTreeWidget().
|
privateslot |
Display the item as not an item that has been undone - it's working or done.
This colors it black and sets the text to completed (only visible if there is no progress bar).
treeItem | The given GUI tree item/row to color appropriately. |
Definition at line 226 of file HistoryTreeWidget.cpp.
Referenced by handleUndoIndexChanged().
|
privateslot |
Display the item as an item that has been undone.
This colors it gray and sets the text to Undone.
treeItem | The given GUI tree item/row to color appropriately. |
Definition at line 240 of file HistoryTreeWidget.cpp.
Referenced by handleUndoIndexChanged().
|
private |
This resizes the columns to an okay width for viewing all of the data cleanly.
This method depends on sizeHintForColumn() for good column sizes.
Definition at line 86 of file HistoryTreeWidget.cpp.
Referenced by addToHistory(), and HistoryTreeWidget().
|
privateslot |
A work order was lost...
compensate by removing it from the tree.
Definition at line 269 of file HistoryTreeWidget.cpp.
References undoCommandToTreeItem().
Referenced by addToHistory().
|
privateslot |
This resets the tree widget and re-initializes.
Definition at line 317 of file HistoryTreeWidget.cpp.
References addToHistory(), and Isis::Project::workOrderHistory().
Referenced by HistoryTreeWidget().
|
protected |
Get the preferred size of a given column.
This is used by resizeColumnToContents().
The work order name column prefers space not taken by other columns. The progress column prefers 200. The date column prefers a little more than the text size of a date.
Definition at line 57 of file HistoryTreeWidget.cpp.
|
privateslot |
Get the QTreeWidgetItem associated with the given undo command (work order).
Returns NULL if none found or given NULL.
undoCommand | A work order |
Definition at line 294 of file HistoryTreeWidget.cpp.
Referenced by handleUndoIndexChanged(), and removeFromHistory().
|
privateslot |
We need to manually manage these progress widgets because QTreeWidget does a poor job of it.
This should be called when the progress bar instances have changed (new progress, lost a progress, etc...). This is not necessary when the progress values have changed.
Failing to call this method results in seg faults when other events occur - such as a resize event.
Definition at line 205 of file HistoryTreeWidget.cpp.
References Isis::WorkOrder::progressBar().
Referenced by addToHistory().