![]() |
XML Mill
1.0.0
A GUI based XML editor with a memory.
|
Allows the user to remove items from the active database. More...
#include <gcremoveitemsform.h>
Public Member Functions | |
GCRemoveItemsForm (QWidget *parent=0) | |
Constructor. | |
~GCRemoveItemsForm () | |
Destructor. | |
Private Slots | |
void | elementSelected (GCTreeWidgetItem *item, int column) |
Triggered when an item in the tree widget is clicked. | |
void | deleteElement (const QString &element=QString()) |
Triggered when the user clicks the "Delete Element" button. | |
void | removeChildElement () |
Triggered when the "Remove Child" button is clicked. | |
void | attributeActivated (const QString &attribute) |
Triggered when the current attribute in the attribute combo box changes. | |
void | updateAttributeValues () |
Triggered when the "Update Values" button is clicked. | |
void | deleteAttribute () |
Triggered when the "Delete Attribute" button is clicked. | |
void | showElementHelp () |
Triggered by the "show element help" button. | |
void | showAttributeHelp () |
Triggered by the "show attribute help" button. | |
Private Member Functions | |
void | updateChildLists () |
Removes a deleted element from all elements that may have it in their first level child lists. | |
Private Attributes | |
Ui::GCRemoveItemsForm * | ui |
QString | m_currentElement |
QString | m_currentElementParent |
QString | m_currentAttribute |
QList< QString > | m_deletedElements |
Allows the user to remove items from the active database.
All changes made via this form are irreversible and will be executed immediately against the active database.
The Qt::WA_DeleteOnClose flag is set for all instances of this form. If you're unfamiliar with Qt, this means that Qt will delete this widget as soon as the widget accepts the close event (i.e. you don't need to worry about clean-up of dynamically created instances of this object).
Definition at line 52 of file gcremoveitemsform.h.
GCRemoveItemsForm::GCRemoveItemsForm | ( | QWidget * | parent = 0 | ) | [explicit] |
Constructor.
Definition at line 40 of file gcremoveitemsform.cpp.
Destructor.
Definition at line 69 of file gcremoveitemsform.cpp.
void GCRemoveItemsForm::attributeActivated | ( | const QString & | attribute | ) | [private, slot] |
Triggered when the current attribute in the attribute combo box changes.
Activation of an attribute results in the plain text edit being populated with all the attribute's known values.
Definition at line 111 of file gcremoveitemsform.cpp.
void GCRemoveItemsForm::deleteAttribute | ( | ) | [private, slot] |
Triggered when the "Delete Attribute" button is clicked.
The attribute selected in the attribute combo box is deleted from the active element's list of associated attributes.
Definition at line 264 of file gcremoveitemsform.cpp.
void GCRemoveItemsForm::deleteElement | ( | const QString & | element = QString() | ) | [private, slot] |
Triggered when the user clicks the "Delete Element" button.
A complete clean-up of everything (first level children, attributes, attribute values, etc) is executed recursively for the deleted element (in other words, everything related to the element is removed, including the entire hierarchy of elements below it).
Definition at line 126 of file gcremoveitemsform.cpp.
void GCRemoveItemsForm::elementSelected | ( | GCTreeWidgetItem * | item, |
int | column | ||
) | [private, slot] |
Triggered when an item in the tree widget is clicked.
The element name corresponding to the tree widget item is flagged as currently active and the attribute combo box is populated with the element's known associated attributes.
Definition at line 76 of file gcremoveitemsform.cpp.
void GCRemoveItemsForm::removeChildElement | ( | ) | [private, slot] |
Triggered when the "Remove Child" button is clicked.
The currently active element (corresponding to the selected tree widget item) is removed as a first level child from its immediate parent element.
Definition at line 191 of file gcremoveitemsform.cpp.
void GCRemoveItemsForm::showAttributeHelp | ( | ) | [private, slot] |
Triggered by the "show attribute help" button.
Displays help information related to actions executed against attributes.
Definition at line 327 of file gcremoveitemsform.cpp.
void GCRemoveItemsForm::showElementHelp | ( | ) | [private, slot] |
Triggered by the "show element help" button.
Displays help information related to actions executed against elements.
Definition at line 308 of file gcremoveitemsform.cpp.
void GCRemoveItemsForm::updateAttributeValues | ( | ) | [private, slot] |
Triggered when the "Update Values" button is clicked.
The attribute values remaining in the plain text edit after editing is saved against the selected attribute. This action does not append the values to the existing list, but rather replaces the existing values.
Definition at line 227 of file gcremoveitemsform.cpp.
void GCRemoveItemsForm::updateChildLists | ( | ) | [private] |
Removes a deleted element from all elements that may have it in their first level child lists.
Definition at line 282 of file gcremoveitemsform.cpp.