-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathSettingsPage.cpp
39 lines (34 loc) · 1.3 KB
/
SettingsPage.cpp
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
//-----------------------------------------------------------------------------
// File: SettingsPage.h
//-----------------------------------------------------------------------------
// Project: Kactus 2
// Author: Esko Pekkarinen
// Date: 01.07.2014
//
// Description:
// Base class for all settings pages.
//-----------------------------------------------------------------------------
#include "SettingsPage.h"
//-----------------------------------------------------------------------------
// Function: SettingsPage()
//-----------------------------------------------------------------------------
SettingsPage::SettingsPage(QSettings& settings) :
PropertyPageView(),
settings_(settings)
{
}
//-----------------------------------------------------------------------------
// Function: onPageChange()
//-----------------------------------------------------------------------------
bool SettingsPage::onPageChange()
{
// Do not change the page if the settings are invalid.
return validate();
}
//-----------------------------------------------------------------------------
// Function: SettingsPage::settings()
//-----------------------------------------------------------------------------
QSettings& SettingsPage::settings() const
{
return settings_;
}