XML Mill  1.0.0
A GUI based XML editor with a memory.
gcremoveitemsform.h
00001 /* Copyright (c) 2012 - 2013 by William Hallatt.
00002  *
00003  * This file forms part of "XML Mill".
00004  *
00005  * The official website for this project is <http://www.goblincoding.com> and,
00006  * although not compulsory, it would be appreciated if all works of whatever
00007  * nature using this source code (in whole or in part) include a reference to
00008  * this site.
00009  *
00010  * Should you wish to contact me for whatever reason, please do so via:
00011  *
00012  *                 <http://www.goblincoding.com/contact>
00013  *
00014  * This program is free software: you can redistribute it and/or modify it under
00015  * the terms of the GNU General Public License as published by the Free Software
00016  * Foundation, either version 3 of the License, or (at your option) any later
00017  * version.
00018  *
00019  * This program is distributed in the hope that it will be useful, but WITHOUT
00020  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00021  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License along with
00024  * this program (GNUGPL.txt).  If not, see
00025  *
00026  *                    <http://www.gnu.org/licenses/>
00027  */
00028 
00029 #ifndef GCREMOVEITEMSFORM_H
00030 #define GCREMOVEITEMSFORM_H
00031 
00032 #include <QDialog>
00033 #include <QList>
00034 
00035 namespace Ui
00036 {
00037   class GCRemoveItemsForm;
00038 }
00039 
00040 class GCTreeWidgetItem;
00041 
00043 
00052 class GCRemoveItemsForm : public QDialog
00053 {
00054 Q_OBJECT
00055 
00056 public:
00058   explicit GCRemoveItemsForm( QWidget* parent = 0 );
00059 
00061   ~GCRemoveItemsForm();
00062 
00063   private slots:
00067   void elementSelected( GCTreeWidgetItem* item, int column );
00068 
00073   void deleteElement( const QString& element = QString() );
00074 
00078   void removeChildElement();
00079 
00083   void attributeActivated( const QString& attribute );
00084 
00088   void updateAttributeValues();
00089 
00092   void deleteAttribute();
00093 
00096   void showElementHelp();
00097 
00100   void showAttributeHelp();
00101 
00102 private:
00104   void updateChildLists();
00105 
00106   Ui::GCRemoveItemsForm* ui;
00107   QString m_currentElement;
00108   QString m_currentElementParent;
00109   QString m_currentAttribute;
00110   QList< QString > m_deletedElements;
00111 };
00112 
00113 #endif // GCREMOVEITEMSFORM_H