Isis 3 Programmer Reference
ImageFileListWidget.h
1 #ifndef ImageFileListWidget_H
2 #define ImageFileListWidget_H
3 
4 #include <QWidget>
5 
6 #include <QPointer>
7 #include <QScopedPointer>
8 
9 #include "ImageList.h"
10 #include "ImageTreeWidget.h"
11 #include "PvlObject.h"
12 
13 class QLabel;
14 class QLineEdit;
15 class QProgressBar;
16 class QSettings;
17 class QToolBar;
18 class QTreeWidgetItem;
19 
20 namespace Isis {
21  class Directory;
22  class ImageTreeWidgetItem;
23  class ProgressBar;
24 
64  class ImageFileListWidget : public QWidget {
65  Q_OBJECT
66  public:
67  ImageFileListWidget(Directory *directory = 0, QWidget *parent = 0);
68  virtual ~ImageFileListWidget();
69 
71  void fromPvl(PvlObject &pvl);
72  PvlObject toPvl() const;
73  void load(XmlStackedHandlerReader *xmlReader);
74  void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const;
75 
79 
80  static QWidget *getLongHelp(QWidget *fileListContainer = NULL);
81 
82  public slots:
83  void addImages(ImageList *images);
84  void removeImages(ImageList *images);
85  void clear();
86  void filterFileList();
87 
88  protected:
89  void contextMenuEvent(QContextMenuEvent *event);
90 
91  private slots:
92  void saveList();
93 
94  private:
95  void save(QXmlStreamWriter &stream, QTreeWidgetItem *itemToWrite) const;
96 
97  ImageTreeWidget::ImagePosition find(const Image *image) const;
98  void restoreExpandedStates(QVariant expandedStates, QTreeWidgetItem *item);
99  QVariant saveExpandedStates(QTreeWidgetItem *item);
100 
101  private:
107  class XmlHandler : public XmlStackedHandler {
108  public:
109  XmlHandler(ImageFileListWidget *fileList);
110  ~XmlHandler();
111 
112  virtual bool startElement(const QString &namespaceURI, const QString &localName,
113  const QString &qName, const QXmlAttributes &atts);
114  virtual bool endElement(const QString &namespaceURI, const QString &localName,
115  const QString &qName);
116 
117  private:
118  Q_DISABLE_COPY(XmlHandler);
119 
124  };
125 
126  private:
127  QPointer<ProgressBar> m_progress;
128  QScopedPointer<PvlObject> m_serialized;
130 
132  QLineEdit *m_searchLineEdit;
133  QLabel *m_fileCount;
134 
135 
138  };
139 }
140 
141 #endif
Isis::ImageFileListWidget::restoreExpandedStates
void restoreExpandedStates(QVariant expandedStates, QTreeWidgetItem *item)
This method returns the QTreeWidgetItem to it's expanded state.
Definition: ImageFileListWidget.cpp:558
QWidget
QProgressBar
Isis::ImageFileListWidget::XmlHandler::XmlHandler
XmlHandler(ImageFileListWidget *fileList)
Creates a XmlHandler for fileList.
Definition: ImageFileListWidget.cpp:741
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::Directory
Definition: Directory.h:271
QList< QAction * >
Isis::ImageFileListWidget::save
void save(QXmlStreamWriter &stream, Project *project, FileName newProjectRoot) const
This method saves the FootprintColumns in the project and the settings associated with every column.
Definition: ImageFileListWidget.cpp:626
Isis::ImageFileListWidget::getProgress
QProgressBar * getProgress()
This method returns the progress bar.
Definition: ImageFileListWidget.cpp:108
Isis::ImageFileListWidget::getLongHelp
static QWidget * getLongHelp(QWidget *fileListContainer=NULL)
This method creates a QWidget that displays a long help message explaining the tool.
Definition: ImageFileListWidget.cpp:268
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::ImageFileListWidget::getViewActions
QList< QAction * > getViewActions()
This method calls ImageTreeWidget::getViewActions() which returns a list of FootprintColumns.
Definition: ImageFileListWidget.cpp:240
Isis::ImageFileListWidget::removeImages
void removeImages(ImageList *images)
Removes an imagelist from the FileListWidget.
Definition: ImageFileListWidget.cpp:446
Isis::ImageFileListWidget
A colored, grouped cube list.
Definition: ImageFileListWidget.h:64
Isis::ImageFileListWidget::addImages
void addImages(ImageList *images)
This method adds the new images to the tree.
Definition: ImageFileListWidget.cpp:342
Isis::ImageFileListWidget::m_directory
Directory * m_directory
The directory of the project.
Definition: ImageFileListWidget.h:137
QTreeWidgetItem
Isis::ImageFileListWidget::m_tree
ImageTreeWidget * m_tree
Tree item associated with this mosaic item.
Definition: ImageFileListWidget.h:136
Isis::ImageFileListWidget::saveList
void saveList()
This method saves the list to the choosen output file.
Definition: ImageFileListWidget.cpp:494
Isis::ImageFileListWidget::find
ImageTreeWidget::ImagePosition find(const Image *image) const
This method takes an image and finds it's position.
Definition: ImageFileListWidget.cpp:525
Isis::ImageFileListWidget::saveExpandedStates
QVariant saveExpandedStates(QTreeWidgetItem *item)
This method saves the the expanded state of item.
Definition: ImageFileListWidget.cpp:589
QToolBar
Isis::XmlStackedHandlerReader
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:30
Isis::ImageFileListWidget::actions
QList< QAction * > actions()
This method calls ImageTreeWidget::actions() which sets up a QAction that sets a default for the file...
Definition: ImageFileListWidget.cpp:230
Isis::ImageFileListWidget::~ImageFileListWidget
virtual ~ImageFileListWidget()
Destructor.
Definition: ImageFileListWidget.cpp:98
Isis::Project
The main project for ipce.
Definition: Project.h:289
Isis::ImageFileListWidget::getExportActions
QList< QAction * > getExportActions()
This method creates a new QAction which is connected and when triggered will save the cube list.
Definition: ImageFileListWidget.cpp:250
Isis::ImageList
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
Isis::ImageTreeWidget::ImagePosition
Definition: ImageTreeWidget.h:82
Isis::ImageFileListWidget::m_searchToolbar
QToolBar * m_searchToolbar
Tool bar for the FileList widget to search.
Definition: ImageFileListWidget.h:131
Isis::ImageFileListWidget::XmlHandler::~XmlHandler
~XmlHandler()
Destructor.
Definition: ImageFileListWidget.cpp:751
Isis::ImageFileListWidget::XmlHandler::m_currentGroup
QTreeWidgetItem * m_currentGroup
The group of cubes being worked on.
Definition: ImageFileListWidget.h:123
Isis::ImageFileListWidget::m_progress
QPointer< ProgressBar > m_progress
The ProgressBar of the ImageFileListWidget Serialized (file) version of this object.
Definition: ImageFileListWidget.h:127
Isis::ImageFileListWidget::XmlHandler::m_currentImageListItem
QTreeWidgetItem * m_currentImageListItem
The image being worked on.
Definition: ImageFileListWidget.h:122
Isis::Image
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Isis::ImageFileListWidget::load
void load(XmlStackedHandlerReader *xmlReader)
This method pushes a new XmlHandler into the parser stack.
Definition: ImageFileListWidget.cpp:613
Isis::ImageFileListWidget::XmlHandler::m_fileList
ImageFileListWidget * m_fileList
The widget we are working with.
Definition: ImageFileListWidget.h:120
Isis::ImageFileListWidget::XmlHandler::endElement
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
This method calls XmlStackedHandler's endElement() and dereferences pointers according to the value o...
Definition: ImageFileListWidget.cpp:858
Isis::ImageFileListWidget::XmlHandler::m_currentImageList
ImageList * m_currentImageList
The list of images being worked on.
Definition: ImageFileListWidget.h:121
Isis::ImageFileListWidget::XmlHandler
Definition: ImageFileListWidget.h:107
Isis::XmlStackedHandler
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:118
Isis::ImageFileListWidget::fromPvl
void fromPvl(PvlObject &pvl)
This method loads the state of this class from the pvl.
Definition: ImageFileListWidget.cpp:119
Isis::ImageTreeWidget
Definition: ImageTreeWidget.h:42
Isis::ImageFileListWidget::ImageFileListWidget
ImageFileListWidget(Directory *directory=0, QWidget *parent=0)
Constructor.
Definition: ImageFileListWidget.cpp:46
Isis::ImageFileListWidget::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *event)
This method takes an event and gets all of the FootprintColumns, adds them to the menu,...
Definition: ImageFileListWidget.cpp:474
Isis::ImageFileListWidget::toPvl
PvlObject toPvl() const
This method writes the state of this class to a pvl.
Definition: ImageFileListWidget.cpp:183
Isis::ImageFileListWidget::XmlHandler::startElement
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
This method calls XmlStackedHandler's startElement() and retrieves attributes from atts according to ...
Definition: ImageFileListWidget.cpp:765
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16