summaryrefslogtreecommitdiffstats
path: root/filesystemwidget.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-04-03 07:52:56 +0200
committerArno <arno@disconnect.de>2018-04-03 07:52:56 +0200
commitbac6fe431150bb5706fe0fb349e753b8fe08c12e (patch)
tree2841c2c8c3e8e33321855a0635f4b8f0d6891b46 /filesystemwidget.h
parent2213d00d25b6b3127e33a0df63cae54d29748d06 (diff)
downloadSheMov-bac6fe431150bb5706fe0fb349e753b8fe08c12e.tar.gz
SheMov-bac6fe431150bb5706fe0fb349e753b8fe08c12e.tar.bz2
SheMov-bac6fe431150bb5706fe0fb349e753b8fe08c12e.zip
Good riddance Filesystem Widget!
Get rid of FilesystemWidget and helper classes. The SmDirWatcher was useful, once, I guess, nice to implement it by foot, but with the current workflow it isn't needed any more.
Diffstat (limited to 'filesystemwidget.h')
-rw-r--r--filesystemwidget.h137
1 files changed, 0 insertions, 137 deletions
diff --git a/filesystemwidget.h b/filesystemwidget.h
deleted file mode 100644
index 0b34874..0000000
--- a/filesystemwidget.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version
- 2 of the License, or (at your option) any later version.
-*/
-
-#ifndef FILESYSTEMWIDGET_H
-#define FILESYSTEMWIDGET_H
-
-#include <QWidget>
-#include <QFileSystemModel>
-#include <QSqlDatabase>
-#include <QDateTime>
-#include <QMutex>
-#include <QThread>
-
-class SmTreeView;
-class FilesystemDirProxy;
-class FileView;
-class FilesystemFileProxy;
-class QLineEdit;
-class PictureViewer2;
-class FileSystemModel;
-class SheMovIconProvider;
-class SmDirModel;
-class QToolBar;
-class QSplitter;
-class UnpackDialog;
-class Unpacker;
-
-class FilesystemWidget : public QWidget {
- Q_OBJECT
- public:
- enum ClipboardMode { Copy, Cut, None };
- enum SelectedFiles { Current, Previous };
- FilesystemWidget(QWidget *parent = 0);
- FileView *fileView() { return mFileView; }
- FilesystemFileProxy *fileProxy() { return mFileProxy; }
- FileSystemModel *dirModel() { return mModel; }
- SmDirModel *fileModel() { return mFileModel; }
- const QString windowTitle() const { return mWindowTitle; }
- PictureViewer2 *pictureViewer() { return mPicViewer; }
- QToolBar *toolBar() { return mToolBar; }
- bool isMounted();
- const QString currentDir() const;
-
- signals:
- void windowTitle(const QString &);
- void statusbarMessage(const QString &);
- void mounted(bool);
- void upSelected(const QString &);
-
- public slots:
- void directoryChanged(const QModelIndex &selected, const QModelIndex &);
- void directoryEdited();
- void fileViewActivated(const QModelIndex &index);
- void parentDir();
- void goBack();
- void deleteFiles();
- void toClipboard(int clipmode);
- void fromClipboard();
- void renameFile();
- void playSelectedWithDefault();
- void playSelected(const QString &player);
- void playSelectedRepeat(int times);
- void playSelectedInfinite();
- void readSettings();
- void writeSettings();
- void configChanged();
- void dvdMount();
- void moveToArchive();
- void selectAllPV();
- void setWindowTitle();
- void preview();
- void unpack();
- void untar();
- void selectUnpackDir();
- void centerCurrent();
- void resizeFileView();
-
- protected:
- void keyPressEvent(QKeyEvent *e);
-
- private slots:
- void dirExpanded(const QModelIndex &idx);
- void dirCollapsed(const QModelIndex &idx);
- void fileEditorClosed(const QModelIndex &idx);
-
- private:
- void copyFiles(const QStringList &files, const QString &dest);
- void moveFiles(const QStringList &files, const QString &dest);
- void copyRecursive(const QFileInfo &start, const QString &destdir);
- const QString selectedDir();
- QPair<QString, QStringList> programData(const QString &prefix, const QString &preferred);
- QStringList selectedFiles();
- QStringList mExpandedDirs;
- FileSystemModel *mModel;
- SmDirModel *mFileModel;
- SmTreeView *mDirView;
- FileView *mFileView;
- FilesystemDirProxy *mDirProxy;
- FilesystemFileProxy *mFileProxy;
- QToolBar *mToolBar;
- QLineEdit *mDirEdit;
- QString mWindowTitle;
- QString mTemplate;
- qint64 mSize;
- PictureViewer2 *mPicViewer;
- SheMovIconProvider *mIconProvider;
- QString mLastDir;
- QHash<int,QStringList> mLastFiles;
- int mClipboardMode;
- QSplitter *mIconDirSplitter;
- UnpackDialog *mUnpackDlg;
-};
-
-class FileSystemModel : public QFileSystemModel {
- Q_OBJECT
- public:
- FileSystemModel(QObject *parent = 0);
- ~FileSystemModel() {}
-
- public slots:
- void markForClipboard(const QPersistentModelIndex &idx);
- void clearClipboardList();
-
- private:
- void cleanup();
- QHash<QString, QDateTime> mSeen;
- QSqlDatabase mDb;
- QSqlQuery *mDeleteFromSeenQuery;
- QSqlQuery *mMarkAsSeenQuery;
- QList<QPersistentModelIndex> mClipEntries;
-};
-
-#endif