casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
filecatalog.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 //# $Id: $
26 
27 
28 #ifndef FILECATALOG_H
29 #define FILECATALOG_H
30 
31 #include <graphics/X11/X_enter.h>
32 #include <QMainWindow>
33 #include <QMap>
34 #include <QModelIndex>
35 #include <QPointer>
36 
37 
38 class QAction;
39 class QComboBox;
40 class QLineEdit;
41 class QTreeView;
42 class QDir;
43 class QMenu;
44 class QFile;
45 class QSortFilterProxyModel;
46 class QComboBox;
47 class QStringList;
48 class QLabel;
49 
50 #include <graphics/X11/X_exit.h>
51 
52 namespace casa {
53 
54 class DirModel;
55 
56 class FileCatalog : public QMainWindow
57 {
58  Q_OBJECT
59 
60 public:
61  FileCatalog(QString logger = 0, QWidget *parent = 0);
62 
63 protected:
64  virtual void closeEvent(QCloseEvent *e);
65 
66 private:
67  void setupActions();
68  void updateMenus();
69  bool load(QDir *f);
70  bool removeDir(const QString &);
71  bool copyDir(QString &, QString &);
72  bool maybeSave();
73  bool canDel;
74  bool canNew;
75  bool canOpen;
76  bool canGo;
78 
79 
80 private slots:
81  void fileNew();
82  void dirNew();
83  void fileOpen();
84 
85  void search();
86  void remove();
87  void changeDir();
88  void changeDir(int);
89  void changeDir(QString);
90  void copy();
91  void paste();
92  void rename();
93  void insert();
94  void doFilter();
95  void filterChanged(QAction*);
96  void clicked(const QModelIndex &index);
97 private:
98 
99  QAction *actionNew,
100  *actionOpen,
101  *actionCD,
102  *actionSearch,
103  *actionFilter,
104  *actionInsert,
105  *actionRename,
106  *actionCopy,
107  *actionPaste,
108  *actionDelete;
109 
110  QLineEdit *searchText;
111  QLineEdit *insertText;
112 
113  QComboBox *filterColumn;
114  QStringList filterList;
115  QComboBox *visitedDir;
116  QStringList visitedList;
117 
118  QToolBar *tb;
119  QToolBar *tb2;
120  QLabel *searchLabel;
121  QLabel *insertLabel;
122 
123  QString copyName;
124  QModelIndex currentLogRow;
125  QString currentSearch;
126 
127  QString fileName;
128 
129  QTreeView *dirView;
131  QSortFilterProxyModel *proxyModel;
132  QDir* dir;
133 };
134 
135 }
136 #endif
QStringList filterList
QComboBox * visitedDir
QStringList visitedList
virtual void closeEvent(QCloseEvent *e)
QAction * actionCopy
QAction * actionOpen
QAction * actionPaste
QLineEdit * searchText
QTreeView * dirView
QAction * actionRename
FileCatalog(QString logger=0, QWidget *parent=0)
QModelIndex currentLogRow
QComboBox * filterColumn
QLineEdit * insertText
void filterChanged(QAction *)
QAction * actionFilter
QAction * actionSearch
void clicked(const QModelIndex &index)
const Double e
e and functions thereof:
bool copyDir(QString &, QString &)
QAction * actionInsert
bool removeDir(const QString &)
QSortFilterProxyModel * proxyModel
QAction * actionDelete
bool load(QDir *f)