summaryrefslogtreecommitdiffstats
path: root/shemov.h
blob: 4c2a6742d8ba613d4b86a09c008d179844039edc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*
  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 SHEMOV_H
#define SHEMOV_H

#include <QMainWindow>
#include <QVariant>

class QTabWidget;
class QLabel;
class QActionGroup;
class NewMovieWizard;
class PicturesWidget;
class SmTreeModel;
class SmTreeView;
class NewPicsDialog;
class ArchiveView;
class ArchiveBrowser;
class SearchDialog;
class RandomTab;
class FSWidget;
class MovieWidget;

class SheMov : public QMainWindow {
	Q_OBJECT
	public:
		SheMov(QWidget *parent = 0, Qt::WindowFlags flags = 0);
        enum TabNum { FileManager = 0, Movies = 1, Pictures = 2, ArchiveBrowserTab = 3, RandomDisp = 4 };
		virtual ~SheMov() {}

	protected:
		virtual void closeEvent(QCloseEvent *event);

	private slots:
        void updateSelectedCount(int count);
		void statusbarMessage(const QString &message);
		void configure();
		void tabChanged(int newTab);
		void setFsFree();
		void aboutShemov();
		void showStatistics();
		void setSize(qint64 size);
        void setDuration(qint64 dur, bool maybeMore);
		void checkConsistency();
		void toggleHover(QObject *object);
        void analyzeActors();
        void analyzeGenres();
        void analyzeSeries();
        void analyzeParts();

	signals:
		void configChanged();

	private:
        QAction *createSeparator();
        void createHeaderMapper(SmTreeModel *model, SmTreeView *view, QActionGroup *group);
		void createStatusbar();
		void createActions();
		void createMenus();
		void createOpenWithMenuFS();
		void createToolBar();
		void writeSettings();
        void readSettings();
        void createPalette();

		//Statusbar Items
        QLabel *mSelectedDuration;
		QLabel *mSelectedItems;
		QLabel *mSelectedSize;
		QLabel *mFsFree;

		//Actions
        QAction *mQuitA;
		QAction *mConfigA;
		QAction *mAboutShemovA;
		QAction *mAboutQtA;
		QAction *mStatisticsA;
		QAction *mConsistencyA;
        QAction *mSearchDialogA;
        QActionGroup *mPicsTreeHeaderGroup;

        //PictureWidget Actions
        //PW = mPicWidget
        //PV = pictureViewer
        QAction *mPWDeletePicFromA;
        QAction *mPWEditPicMappingsA;
        QAction *mPWRefreshA;
        QAction *mPVToggleA;
        QAction *mPVAddA;
        QAction *mPVMarkA;
        QAction *mPVDeleteA;
        QAction *mPVClearMarksA;
        QAction *mPVReplaceA;
        QAction *mPVSelectAllA;
        QAction *mPVCopyToA;
        QAction *mPVShowNPDialogA;
        QAction *mPVAddToNPA;
        QAction *mPVSlideDlgA;
        QActionGroup *mPicActionGroup;
        //EndActions

        //ArchiveBrowser
        QAction *mArchiveBrowserViewMenuA;
        QAction *mArchiveBrowserMoveToBurnA;
        QAction *mArchiveBrowserMoveToUSBA;
        QAction *mArchiveBrowserRefreshA;
        QAction *mArchiveBrowserPlaySelectedA;
        QAction *mArchiveBrowserExpandAllA;
        QAction *mArchiveBrowserCollapseAllA;
        QActionGroup *mArchiveBrowserAG;

        //ArchiveFiles actions
        QAction *mArchiveFilesPlayA;
        QAction *mArchiveFilesQualityA;
        QAction *mArchiveFilesDvdNoA;
        QAction *mArchiveFilesTypeA;
        QAction *mArchiveFilesFileNoA;
        QAction *mArchiveFilesPropertiesA;
        QAction *mArchiveFilesPreviewA;
        QAction *mArchiveRemoveFilesA;

        //DB analyze actions
        QAction *mAnalyzeActorsA;
        QAction *mAnalyzeGenresA;
        QAction *mAnalyzeSeriesA;
        QAction *mAnalyzePartsA;

        QMenu *mEditPicMenu;
        QMenu *mPlaySelectedTimesMenuFS;
        QMenu *mPicViewMenu;
        QMenu *mArchiveBrowserViewMenu;
        QMenu *mRandomEditMenu;
        QAction *mEditFSMenuA;
        QAction *mEditPicMenuA;
        QAction *mViewPicMenuA;

        QAction *mRandomEditMenuA;

		//widgets + dialogs
		QTabWidget *mTab;
        SearchDialog *mSearchDialog;
        PicturesWidget *mPicWidget;
        ArchiveBrowser *mArchiveBrowser;
        RandomTab *mRandomTab;
        FSWidget* mFileWidget; //rename me!
        MovieWidget *mMovieWidget;
};
#endif