filecatalog.qo.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef FILECATALOG_H
00029 #define FILECATALOG_H
00030
00031 #include <graphics/X11/X_enter.h>
00032 #include <QMainWindow>
00033 #include <QMap>
00034 #include <QModelIndex>
00035 #include <QPointer>
00036
00037
00038 class QAction;
00039 class QComboBox;
00040 class QLineEdit;
00041 class QTreeView;
00042 class QDir;
00043 class QMenu;
00044 class QFile;
00045 class QSortFilterProxyModel;
00046 class QComboBox;
00047 class QStringList;
00048 class QLabel;
00049
00050 #include <graphics/X11/X_exit.h>
00051
00052 namespace casa {
00053
00054 class DirModel;
00055
00056 class FileCatalog : public QMainWindow
00057 {
00058 Q_OBJECT
00059
00060 public:
00061 FileCatalog(QString logger = 0, QWidget *parent = 0);
00062
00063 protected:
00064 virtual void closeEvent(QCloseEvent *e);
00065
00066 private:
00067 void setupActions();
00068 void updateMenus();
00069 bool load(QDir *f);
00070 bool removeDir(const QString &);
00071 bool copyDir(QString &, QString &);
00072 bool maybeSave();
00073 bool canDel;
00074 bool canNew;
00075 bool canOpen;
00076 bool canGo;
00077 bool hasSelected;
00078
00079
00080 private slots:
00081 void fileNew();
00082 void dirNew();
00083 void fileOpen();
00084
00085 void search();
00086 void remove();
00087 void changeDir();
00088 void changeDir(int);
00089 void changeDir(QString);
00090 void copy();
00091 void paste();
00092 void rename();
00093 void insert();
00094 void doFilter();
00095 void filterChanged(QAction*);
00096 void clicked(const QModelIndex &index);
00097 private:
00098
00099 QAction *actionNew,
00100 *actionOpen,
00101 *actionCD,
00102 *actionSearch,
00103 *actionFilter,
00104 *actionInsert,
00105 *actionRename,
00106 *actionCopy,
00107 *actionPaste,
00108 *actionDelete;
00109
00110 QLineEdit *searchText;
00111 QLineEdit *insertText;
00112
00113 QComboBox *filterColumn;
00114 QStringList filterList;
00115 QComboBox *visitedDir;
00116 QStringList visitedList;
00117
00118 QToolBar *tb;
00119 QToolBar *tb2;
00120 QLabel *searchLabel;
00121 QLabel *insertLabel;
00122
00123 QString copyName;
00124 QModelIndex currentLogRow;
00125 QString currentSearch;
00126
00127 QString fileName;
00128
00129 QTreeView *dirView;
00130 DirModel *dirModel;
00131 QSortFilterProxyModel *proxyModel;
00132 QDir* dir;
00133 };
00134
00135 }
00136 #endif