-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathFileTypeSettingsPage.h
74 lines (57 loc) · 2.02 KB
/
FileTypeSettingsPage.h
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
//-----------------------------------------------------------------------------
// File: FileTypeSettingsPage.h
//-----------------------------------------------------------------------------
// Project: Kactus 2
// Author: Joni-Matti Maatta
// Date: 20.2.2012
//
// Description:
// File type settings property page.
//-----------------------------------------------------------------------------
#ifndef FILETYPESETTINGSPAGE_H
#define FILETYPESETTINGSPAGE_H
#include "FileTypesModel.h"
#include "SettingsPage.h"
#include "filetypesview.h"
#include <QLineEdit>
#include <QSettings>
#include <QSortFilterProxyModel>
//-----------------------------------------------------------------------------
//! FileTypeSettingsPage class.
//-----------------------------------------------------------------------------
class FileTypeSettingsPage : public SettingsPage
{
Q_OBJECT
public:
/*!
* Constructor.
*
* @param [in/out] settings The settings store.
*/
FileTypeSettingsPage(QSettings& settings);
/*!
* Destructor.
*/
virtual ~FileTypeSettingsPage() = default;
// Disable copying.
FileTypeSettingsPage(FileTypeSettingsPage const& rhs) = delete;
FileTypeSettingsPage& operator=(FileTypeSettingsPage const& rhs) = delete;
/*!
* Applies the changes that were done in the page.
*/
virtual void apply() override final;
private:
//-----------------------------------------------------------------------------
// Data.
//-----------------------------------------------------------------------------
//! The file types data model.
FileTypesModel model_;
//! Proxy model for sorting.
QSortFilterProxyModel proxyModel_;
//! The table view for file types.
FileTypesView view_;
//! Line edit for ignored extensions.
QLineEdit ignoredExtensionsEdit_;
};
//-----------------------------------------------------------------------------
#endif // FILETYPESETTINGSPAGE_H