Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
f5686922
Commit
f5686922
authored
Jan 27, 2009
by
hjk
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
75aaeff2
ce2ad5f2
Changes
12
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/images/sidebaricon.png
View replaced file @
75aaeff2
View file @
f5686922
294 Bytes
|
W:
|
H:
436 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
src/plugins/cpptools/completionsettingspage.ui
View file @
f5686922
...
...
@@ -15,33 +15,42 @@
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QCheckBox"
name=
"caseSensitive"
>
<property
name=
"text"
>
<string>
&
Case-sensitive completion
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"autoInsertBraces"
>
<property
name=
"text"
>
<string>
&
Automatically insert braces
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"partiallyComplete"
>
<property
name=
"text"
>
<string>
Autocomplete common
&
prefix
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
<widget
class=
"QGroupBox"
name=
"groupBox"
>
<property
name=
"title"
>
<string>
Completion Settings
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<widget
class=
"QCheckBox"
name=
"caseSensitive"
>
<property
name=
"text"
>
<string>
&
Case-sensitive completion
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"autoInsertBraces"
>
<property
name=
"text"
>
<string>
&
Automatically insert braces
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QCheckBox"
name=
"partiallyComplete"
>
<property
name=
"text"
>
<string>
Autocomplete common
&
prefix
</string>
</property>
<property
name=
"checked"
>
<bool>
true
</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
...
...
src/plugins/projectexplorer/projecttreewidget.cpp
View file @
f5686922
...
...
@@ -74,13 +74,6 @@ public:
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
setUniformRowHeights
(
true
);
setTextElideMode
(
Qt
::
ElideNone
);
setAlternatingRowColors
(
true
);
QPalette
pal
=
palette
();
if
(
pal
.
base
().
color
()
==
Qt
::
white
)
{
// Leave dark themes as they are
pal
.
setBrush
(
QPalette
::
AlternateBase
,
QColor
(
239
,
239
,
239
));
setPalette
(
pal
);
}
setProperty
(
"AlternateEmpty"
,
true
);
// Let Manhattan to override style default
// setExpandsOnDoubleClick(false);
}
...
...
src/plugins/texteditor/
general
settingspage.cpp
→
src/plugins/texteditor/
behavior
settingspage.cpp
View file @
f5686922
...
...
@@ -31,72 +31,68 @@
**
***************************************************************************/
#include
"displaysettings.h"
#include
"generalsettingspage.h"
#include
"behaviorsettingspage.h"
#include
"interactionsettings.h"
#include
"storagesettings.h"
#include
"tabsettings.h"
#include
"ui_
general
settingspage.h"
#include
"ui_
behavior
settingspage.h"
#include
<coreplugin/icore.h>
#include
<QtCore/QSettings>
#include
<QtCore/QDebug>
using
namespace
TextEditor
;
struct
General
SettingsPage
::
General
SettingsPagePrivate
struct
Behavior
SettingsPage
::
Behavior
SettingsPagePrivate
{
explicit
General
SettingsPagePrivate
(
const
General
SettingsPageParameters
&
p
);
explicit
Behavior
SettingsPagePrivate
(
const
Behavior
SettingsPageParameters
&
p
);
const
General
SettingsPageParameters
m_parameters
;
Ui
::
general
SettingsPage
m_page
;
const
Behavior
SettingsPageParameters
m_parameters
;
Ui
::
Behavior
SettingsPage
m_page
;
TabSettings
m_tabSettings
;
StorageSettings
m_storageSettings
;
DisplaySettings
m_displaySettings
;
InteractionSettings
m_interactionSettings
;
};
General
SettingsPage
::
General
SettingsPagePrivate
::
General
SettingsPagePrivate
(
const
General
SettingsPageParameters
&
p
)
Behavior
SettingsPage
::
Behavior
SettingsPagePrivate
::
Behavior
SettingsPagePrivate
(
const
Behavior
SettingsPageParameters
&
p
)
:
m_parameters
(
p
)
{
if
(
const
QSettings
*
s
=
Core
::
ICore
::
instance
()
->
settings
())
{
m_tabSettings
.
fromSettings
(
m_parameters
.
settingsPrefix
,
s
);
m_storageSettings
.
fromSettings
(
m_parameters
.
settingsPrefix
,
s
);
m_displaySettings
.
fromSettings
(
m_parameters
.
settingsPrefix
,
s
);
m_interactionSettings
.
fromSettings
(
m_parameters
.
settingsPrefix
,
s
);
}
}
General
SettingsPage
::
General
SettingsPage
(
const
General
SettingsPageParameters
&
p
,
Behavior
SettingsPage
::
Behavior
SettingsPage
(
const
Behavior
SettingsPageParameters
&
p
,
QObject
*
parent
)
:
Core
::
IOptionsPage
(
parent
),
m_d
(
new
General
SettingsPagePrivate
(
p
))
m_d
(
new
Behavior
SettingsPagePrivate
(
p
))
{
}
General
SettingsPage
::~
General
SettingsPage
()
Behavior
SettingsPage
::~
Behavior
SettingsPage
()
{
delete
m_d
;
}
QString
General
SettingsPage
::
name
()
const
QString
Behavior
SettingsPage
::
name
()
const
{
return
m_d
->
m_parameters
.
name
;
}
QString
General
SettingsPage
::
category
()
const
QString
Behavior
SettingsPage
::
category
()
const
{
return
m_d
->
m_parameters
.
category
;
return
m_d
->
m_parameters
.
category
;
}
QString
General
SettingsPage
::
trCategory
()
const
QString
Behavior
SettingsPage
::
trCategory
()
const
{
return
m_d
->
m_parameters
.
trCategory
;
}
QWidget
*
General
SettingsPage
::
createPage
(
QWidget
*
parent
)
QWidget
*
Behavior
SettingsPage
::
createPage
(
QWidget
*
parent
)
{
QWidget
*
w
=
new
QWidget
(
parent
);
m_d
->
m_page
.
setupUi
(
w
);
...
...
@@ -104,15 +100,13 @@ QWidget *GeneralSettingsPage::createPage(QWidget *parent)
return
w
;
}
void
General
SettingsPage
::
apply
()
void
Behavior
SettingsPage
::
apply
()
{
TabSettings
newTabSettings
;
StorageSettings
newStorageSettings
;
DisplaySettings
newDisplaySettings
;
InteractionSettings
newInteractionSettings
;
settingsFromUI
(
newTabSettings
,
newStorageSettings
,
newDisplaySettings
,
newInteractionSettings
);
settingsFromUI
(
newTabSettings
,
newStorageSettings
,
newInteractionSettings
);
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
QSettings
*
s
=
core
->
settings
();
...
...
@@ -133,105 +127,61 @@ void GeneralSettingsPage::apply()
emit
storageSettingsChanged
(
newStorageSettings
);
}
if
(
newDisplaySettings
!=
m_d
->
m_displaySettings
)
{
m_d
->
m_displaySettings
=
newDisplaySettings
;
if
(
s
)
m_d
->
m_displaySettings
.
toSettings
(
m_d
->
m_parameters
.
settingsPrefix
,
s
);
emit
displaySettingsChanged
(
newDisplaySettings
);
}
if
(
newInteractionSettings
!=
m_d
->
m_interactionSettings
)
{
m_d
->
m_interactionSettings
=
newInteractionSettings
;
if
(
s
)
m_d
->
m_interactionSettings
.
toSettings
(
m_d
->
m_parameters
.
settingsPrefix
,
s
);
}
}
void
General
SettingsPage
::
settingsFromUI
(
TabSettings
&
rc
,
void
Behavior
SettingsPage
::
settingsFromUI
(
TabSettings
&
tabSettings
,
StorageSettings
&
storageSettings
,
DisplaySettings
&
displaySettings
,
InteractionSettings
&
interactionSettings
)
const
{
rc
.
m_spacesForTabs
=
m_d
->
m_page
.
insertSpaces
->
isChecked
();
rc
.
m_autoIndent
=
m_d
->
m_page
.
autoIndent
->
isChecked
();
rc
.
m_smartBackspace
=
m_d
->
m_page
.
smartBackspace
->
isChecked
();
rc
.
m_tabSize
=
m_d
->
m_page
.
tabSize
->
value
();
rc
.
m_indentSize
=
m_d
->
m_page
.
indentSize
->
value
();
tabSettings
.
m_spacesForTabs
=
m_d
->
m_page
.
insertSpaces
->
isChecked
();
tabSettings
.
m_autoIndent
=
m_d
->
m_page
.
autoIndent
->
isChecked
();
tabSettings
.
m_smartBackspace
=
m_d
->
m_page
.
smartBackspace
->
isChecked
();
tabSettings
.
m_tabSize
=
m_d
->
m_page
.
tabSize
->
value
();
tabSettings
.
m_indentSize
=
m_d
->
m_page
.
indentSize
->
value
();
storageSettings
.
m_cleanWhitespace
=
m_d
->
m_page
.
cleanWhitespace
->
isChecked
();
storageSettings
.
m_inEntireDocument
=
m_d
->
m_page
.
inEntireDocument
->
isChecked
();
storageSettings
.
m_cleanIndentation
=
m_d
->
m_page
.
cleanIndentation
->
isChecked
();
storageSettings
.
m_addFinalNewLine
=
m_d
->
m_page
.
addFinalNewLine
->
isChecked
();
displaySettings
.
m_displayLineNumbers
=
m_d
->
m_page
.
displayLineNumbers
->
isChecked
();
displaySettings
.
m_textWrapping
=
m_d
->
m_page
.
enableTextWrapping
->
isChecked
();
displaySettings
.
m_showWrapColumn
=
m_d
->
m_page
.
showWrapColumn
->
isChecked
();
displaySettings
.
m_wrapColumn
=
m_d
->
m_page
.
wrapColumn
->
value
();
displaySettings
.
m_visualizeWhitespace
=
m_d
->
m_page
.
visualizeWhitespace
->
isChecked
();
displaySettings
.
m_displayFoldingMarkers
=
m_d
->
m_page
.
displayFoldingMarkers
->
isChecked
();
displaySettings
.
m_highlightCurrentLine
=
m_d
->
m_page
.
highlightCurrentLine
->
isChecked
();
interactionSettings
.
m_useVim
=
m_d
->
m_page
.
useVim
->
isChecked
();
}
void
General
SettingsPage
::
settingsToUI
()
void
Behavior
SettingsPage
::
settingsToUI
()
{
TabSettings
rc
=
m_d
->
m_tabSettings
;
m_d
->
m_page
.
insertSpaces
->
setChecked
(
rc
.
m_spacesForTabs
);
m_d
->
m_page
.
autoIndent
->
setChecked
(
rc
.
m_autoIndent
);
m_d
->
m_page
.
smartBackspace
->
setChecked
(
rc
.
m_smartBackspace
);
m_d
->
m_page
.
tabSize
->
setValue
(
rc
.
m_tabSize
);
m_d
->
m_page
.
indentSize
->
setValue
(
rc
.
m_indentSize
);
StorageSettings
storageSettings
=
m_d
->
m_storageSettings
;
const
TabSettings
&
tabSettings
=
m_d
->
m_tabSettings
;
m_d
->
m_page
.
insertSpaces
->
setChecked
(
tabSettings
.
m_spacesForTabs
);
m_d
->
m_page
.
autoIndent
->
setChecked
(
tabSettings
.
m_autoIndent
);
m_d
->
m_page
.
smartBackspace
->
setChecked
(
tabSettings
.
m_smartBackspace
);
m_d
->
m_page
.
tabSize
->
setValue
(
tabSettings
.
m_tabSize
);
m_d
->
m_page
.
indentSize
->
setValue
(
tabSettings
.
m_indentSize
);
const
StorageSettings
&
storageSettings
=
m_d
->
m_storageSettings
;
m_d
->
m_page
.
cleanWhitespace
->
setChecked
(
storageSettings
.
m_cleanWhitespace
);
m_d
->
m_page
.
inEntireDocument
->
setChecked
(
storageSettings
.
m_inEntireDocument
);
m_d
->
m_page
.
cleanIndentation
->
setChecked
(
storageSettings
.
m_cleanIndentation
);
m_d
->
m_page
.
addFinalNewLine
->
setChecked
(
storageSettings
.
m_addFinalNewLine
);
DisplaySettings
displaySettings
=
m_d
->
m_displaySettings
;
m_d
->
m_page
.
displayLineNumbers
->
setChecked
(
displaySettings
.
m_displayLineNumbers
);
m_d
->
m_page
.
enableTextWrapping
->
setChecked
(
displaySettings
.
m_textWrapping
);
m_d
->
m_page
.
showWrapColumn
->
setChecked
(
displaySettings
.
m_showWrapColumn
);
m_d
->
m_page
.
wrapColumn
->
setValue
(
displaySettings
.
m_wrapColumn
);
m_d
->
m_page
.
visualizeWhitespace
->
setChecked
(
displaySettings
.
m_visualizeWhitespace
);
m_d
->
m_page
.
displayFoldingMarkers
->
setChecked
(
displaySettings
.
m_displayFoldingMarkers
);
m_d
->
m_page
.
highlightCurrentLine
->
setChecked
(
displaySettings
.
m_highlightCurrentLine
);
InteractionSettings
interactionSettings
=
m_d
->
m_interactionSettings
;
const
InteractionSettings
&
interactionSettings
=
m_d
->
m_interactionSettings
;
m_d
->
m_page
.
useVim
->
setChecked
(
interactionSettings
.
m_useVim
);
}
TabSettings
General
SettingsPage
::
tabSettings
()
const
TabSettings
Behavior
SettingsPage
::
tabSettings
()
const
{
return
m_d
->
m_tabSettings
;
}
StorageSettings
General
SettingsPage
::
storageSettings
()
const
StorageSettings
Behavior
SettingsPage
::
storageSettings
()
const
{
return
m_d
->
m_storageSettings
;
}
DisplaySettings
GeneralSettingsPage
::
displaySettings
()
const
{
return
m_d
->
m_displaySettings
;
}
InteractionSettings
GeneralSettingsPage
::
interactionSettings
()
const
InteractionSettings
BehaviorSettingsPage
::
interactionSettings
()
const
{
return
m_d
->
m_interactionSettings
;
}
void
GeneralSettingsPage
::
setDisplaySettings
(
const
DisplaySettings
&
newDisplaySettings
)
{
if
(
newDisplaySettings
!=
m_d
->
m_displaySettings
)
{
m_d
->
m_displaySettings
=
newDisplaySettings
;
Core
::
ICore
*
core
=
Core
::
ICore
::
instance
();
if
(
QSettings
*
s
=
core
->
settings
())
m_d
->
m_displaySettings
.
toSettings
(
m_d
->
m_parameters
.
settingsPrefix
,
s
);
emit
displaySettingsChanged
(
newDisplaySettings
);
}
}
src/plugins/texteditor/
general
settingspage.h
→
src/plugins/texteditor/
behavior
settingspage.h
View file @
f5686922
...
...
@@ -31,8 +31,8 @@
**
***************************************************************************/
#ifndef
GENERAL
SETTINGSPAGE_H
#define
GENERAL
SETTINGSPAGE_H
#ifndef
BEHAVIOR
SETTINGSPAGE_H
#define
BEHAVIOR
SETTINGSPAGE_H
#include
"texteditor_global.h"
...
...
@@ -44,10 +44,9 @@ namespace TextEditor {
struct
TabSettings
;
struct
StorageSettings
;
struct
DisplaySettings
;
struct
InteractionSettings
;
struct
TEXTEDITOR_EXPORT
General
SettingsPageParameters
struct
Behavior
SettingsPageParameters
{
QString
name
;
QString
category
;
...
...
@@ -55,13 +54,13 @@ struct TEXTEDITOR_EXPORT GeneralSettingsPageParameters
QString
settingsPrefix
;
};
class
TEXTEDITOR_EXPORT
General
SettingsPage
:
public
Core
::
IOptionsPage
class
Behavior
SettingsPage
:
public
Core
::
IOptionsPage
{
Q_OBJECT
public:
General
SettingsPage
(
const
General
SettingsPageParameters
&
p
,
QObject
*
parent
);
virtual
~
General
SettingsPage
();
Behavior
SettingsPage
(
const
Behavior
SettingsPageParameters
&
p
,
QObject
*
parent
);
virtual
~
Behavior
SettingsPage
();
// IOptionsPage
QString
name
()
const
;
...
...
@@ -74,27 +73,21 @@ public:
TabSettings
tabSettings
()
const
;
StorageSettings
storageSettings
()
const
;
DisplaySettings
displaySettings
()
const
;
InteractionSettings
interactionSettings
()
const
;
void
setDisplaySettings
(
const
DisplaySettings
&
);
signals:
void
tabSettingsChanged
(
const
TextEditor
::
TabSettings
&
);
void
storageSettingsChanged
(
const
TextEditor
::
StorageSettings
&
);
void
displaySettingsChanged
(
const
TextEditor
::
DisplaySettings
&
);
private:
void
settingsFromUI
(
TabSettings
&
rc
,
StorageSettings
&
storageSettings
,
DisplaySettings
&
displaySettings
,
InteractionSettings
&
interactionSettings
)
const
;
InteractionSettings
&
interactionSettings
)
const
;
void
settingsToUI
();
struct
General
SettingsPagePrivate
;
General
SettingsPagePrivate
*
m_d
;
struct
Behavior
SettingsPagePrivate
;
Behavior
SettingsPagePrivate
*
m_d
;
};
}
// namespace TextEditor
#endif //
GENERAL
SETTINGSPAGE_H
#endif //
BEHAVIOR
SETTINGSPAGE_H
src/plugins/texteditor/
general
settingspage.ui
→
src/plugins/texteditor/
behavior
settingspage.ui
View file @
f5686922
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
TextEditor::
general
SettingsPage
</class>
<widget
class=
"QWidget"
name=
"TextEditor::
general
SettingsPage"
>
<class>
TextEditor::
Behavior
SettingsPage
</class>
<widget
class=
"QWidget"
name=
"TextEditor::
Behavior
SettingsPage"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
51
4
</width>
<height>
475
</height>
<width>
48
4
</width>
<height>
398
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
...
...
@@ -255,71 +255,6 @@
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"groupBoxDisplaySettings"
>
<property
name=
"title"
>
<string>
Display Settings
</string>
</property>
<layout
class=
"QGridLayout"
>
<item
row=
"0"
column=
"1"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QCheckBox"
name=
"showWrapColumn"
>
<property
name=
"text"
>
<string>
Display right
&
margin at column
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QSpinBox"
name=
"wrapColumn"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"maximum"
>
<number>
999
</number>
</property>
</widget>
</item>
</layout>
</item>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"enableTextWrapping"
>
<property
name=
"text"
>
<string>
Enable text
&
wrapping
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"displayLineNumbers"
>
<property
name=
"text"
>
<string>
Display line
&
numbers
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"visualizeWhitespace"
>
<property
name=
"text"
>
<string>
&
Visualize whitespace
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QCheckBox"
name=
"displayFoldingMarkers"
>
<property
name=
"text"
>
<string>
Display
&
folding markers
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QCheckBox"
name=
"highlightCurrentLine"
>
<property
name=
"text"
>
<string>
Highlight current
&
line
</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QGroupBox"
name=
"groupBoxInteractionSettings"
>
<property
name=
"title"
>
<string>
Interaction Settings
</string>
...
...
@@ -335,7 +270,7 @@
</layout>
</widget>
</item>
<item
row=
"
4
"
column=
"0"
>
<item
row=
"
3
"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
...
...
@@ -373,20 +308,14 @@
<signal>
toggled(bool)
</signal>
<receiver>
cleanIndentation
</receiver>
<slot>
setEnabled(bool)
</slot>
</connection>
<connection>
<sender>
showWrapColumn
</sender>
<signal>
toggled(bool)
</signal>
<receiver>
wrapColumn
</receiver>
<slot>
setEnabled(bool)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
399
</x>
<y>
308
</y>
<x>
20
</x>
<y>
20
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
474
</x>
<y>
308
</y>
<x>
20
</x>
<y>
20
</y>
</hint>
</hints>
</connection>
...
...
src/plugins/texteditor/displaysettingspage.cpp
0 → 100644
View file @
f5686922
/***************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
**
** Non-Open Source Usage
**
** Licensees may use this file in accordance with the Qt Beta Version
** License Agreement, Agreement version 2.2 provided with the Software or,
** alternatively, in accordance with the terms contained in a written
** agreement between you and Nokia.
**
** GNU General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU General
** Public License versions 2.0 or 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the packaging
** of this file. Please review the following information to ensure GNU
** General Public Licensing requirements will be met:
**
** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
** http://www.gnu.org/copyleft/gpl.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt GPL Exception
** version 1.3, included in the file GPL_EXCEPTION.txt in this package.
**
***************************************************************************/
#include
"displaysettingspage.h"
#include
"displaysettings.h"
#include
"ui_displaysettingspage.h"
#include
<coreplugin/icore.h>
#include
<QtCore/QSettings>
using
namespace
TextEditor
;
struct
DisplaySettingsPage
::
DisplaySettingsPagePrivate
{
explicit
DisplaySettingsPagePrivate
(
const
DisplaySettingsPageParameters
&
p
);
const
DisplaySettingsPageParameters
m_parameters
;
Ui
::
DisplaySettingsPage
m_page
;
DisplaySettings
m_displaySettings
;
};
DisplaySettingsPage
::
DisplaySettingsPagePrivate
::
DisplaySettingsPagePrivate
(
const
DisplaySettingsPageParameters
&
p
)
:
m_parameters
(
p
)
{
if
(
const
QSettings
*
s
=
Core
::
ICore
::
instance
()
->
settings
())
{
m_displaySettings
.
fromSettings
(
m_parameters
.
settingsPrefix
,
s
);
}
}
DisplaySettingsPage
::
DisplaySettingsPage
(
const
DisplaySettingsPageParameters
&
p
,
QObject
*
parent
)
:
Core
::
IOptionsPage
(
parent
),
m_d
(
new
DisplaySettingsPagePrivate
(
p
))
{
}
DisplaySettingsPage
::~
DisplaySettingsPage
()
{
delete
m_d
;
}
QString
DisplaySettingsPage
::
name
()
const
{
return
m_d
->
m_parameters
.
name
;
}
QString
DisplaySettingsPage
::
category
()
const
{
return
m_d
->
m_parameters
.
category
;
}
QString
DisplaySettingsPage
::
trCategory
()
const
{