summaryrefslogtreecommitdiffstats
path: root/configurationdialog.h
blob: cedc142fd479704eee554ffe0c38d7dce05f5300 (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
/*
  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 CONFIGURATIONDIALOG_H
#define CONFIGURATIONDIALOG_H

#include <QHash>
#include <QMap>

#include "smdialog.h"

class QPushButton;
class QTabWidget;
class QLineEdit;
class QComboBox;
class QCheckBox;
class QSpinBox;
class QLabel;
class QStandardItemModel;

class ProgramConfigurator;

class ConfigurationDialog : public SmDialog {
	Q_OBJECT
	public:
        enum Position { TopLeft = 0, TopRight = 1, BottomLeft = 2, BottomRigth = 3, Moveable = 4, NoDisplay = 5 };
		ConfigurationDialog(QWidget *parent = 0, Qt::WindowFlags f = 0);
		~ConfigurationDialog() {}

	public slots:
		void accept();

	private slots:
		void chooseColor(QWidget *label);
		void alternateColorsChanged(int);
        void randomGradientChanged(int);
        void editReason();
        void addReason();
        void delReason();
	
	private:
		void readSettings();
		void writeSettings();
		bool checkDvdPath();
		void mountError(const QString &error);
		void setColor(QWidget *label);
        void createPositionMap();
        void fillPositions(QComboBox *cb);
		QPushButton *mOk;
		QPushButton *mCancel;
        QPushButton *mPVSizeReset;
		QTabWidget *mTab;
		ProgramConfigurator *mMovieConfig;
		QLineEdit *mArchiveDir;
		QLineEdit *mBurnDir;
        QLineEdit *mUSBDir;
		QLineEdit *mFfProbePath;
		QLineEdit *mFfMpegPath;
		QLineEdit *mDvdMountPath;
		QLineEdit *mCoverPath;
		QLineEdit *mDatabaseHost;
		QLineEdit *mDatabaseName;
		QLineEdit *mDatabaseUsername;
		QLineEdit *mDatabasePassword;
		QLineEdit *mWindowsDrive;
		QLineEdit *mStripPath;
		QComboBox *mIconForFolder;
        QComboBox *mIconForFile;
        QComboBox *mIconForSeries;
        QComboBox *mIconForActor;
        QComboBox *mIconForGenre;
        QComboBox *mIconForMeta;
        QComboBox *mInfoBox;
        QComboBox *mMapBox;
        QComboBox *mReasonsBox;
		QCheckBox *mHoverPics;
		QCheckBox *mAutoAddCovers;
		QCheckBox *mIconizeCovers;
        QCheckBox *mAutoRefresh;
        QCheckBox *mExpensive;
        QCheckBox *mClearNewMovieWizard;
		QSpinBox *mHoverOpacity;
		QSpinBox *mCursorOffset;
        QSpinBox *mAutoRefreshValue;
		QLabel *mClipboardColor;
		QLabel *mBaseColor;
		QLabel *mAlternateBaseColor;
		QLabel *mFontColor;
		QLabel *mLocalColor;
		QLabel *mArchivedColor;
		QLabel *mFavoriteColor;
        QLabel *mPVBgColor;
		QPushButton *mSeenButton;
		QPushButton *mClipboardButton;
		QPushButton *mBaseButton;
		QPushButton *mAlternateBaseButton;
		QPushButton *mFontColorButton;
		QPushButton *mLocalColorButton;
		QPushButton *mArchivedColorButton;
		QPushButton *mFavoriteColorButton;
        QPushButton *mPVBgButton;
		QCheckBox *mAlternateColors;
        QCheckBox *mPVGradient;
        QCheckBox *mShowInfoItem;
        QCheckBox *mShowMapItem;
		QHash<QWidget*, QColor> mColors;
        QMap<QString, int> mPositionMap;
		QStandardItemModel *mIconModel;
        const QSize mPVMinSize;
};

#endif