2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2009-06-25 17:16:16 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2009-06-25 17:16:16 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2009-06-25 17:16:16 +02:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2009-06-25 17:16:16 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2010-12-17 16:01:08 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2009-06-25 17:16:16 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2009-06-25 17:16:16 +02:00
|
|
|
|
|
|
|
|
#include "ui_generalsettingspage.h"
|
2010-03-16 14:47:27 +01:00
|
|
|
#include <coreplugin/dialogs/ioptionspage.h>
|
2009-06-25 17:16:16 +02:00
|
|
|
|
2013-12-03 14:17:03 +01:00
|
|
|
#include <QPointer>
|
|
|
|
|
|
2009-06-25 17:16:16 +02:00
|
|
|
namespace Help {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2009-06-26 16:50:50 +02:00
|
|
|
|
2009-06-25 17:16:16 +02:00
|
|
|
class GeneralSettingsPage : public Core::IOptionsPage
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2010-03-23 18:11:43 +01:00
|
|
|
GeneralSettingsPage();
|
2009-06-25 17:16:16 +02:00
|
|
|
|
2013-12-03 14:17:03 +01:00
|
|
|
QWidget *widget();
|
2009-06-25 17:16:16 +02:00
|
|
|
void apply();
|
2010-12-02 18:28:16 +01:00
|
|
|
void finish();
|
2009-06-25 17:16:16 +02:00
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void fontChanged();
|
|
|
|
|
|
2016-06-28 23:07:19 +03:00
|
|
|
private:
|
2009-06-26 16:50:50 +02:00
|
|
|
void setCurrentPage();
|
|
|
|
|
void setBlankPage();
|
|
|
|
|
void setDefaultPage();
|
2009-07-08 15:03:40 +02:00
|
|
|
void importBookmarks();
|
|
|
|
|
void exportBookmarks();
|
2009-06-26 16:50:50 +02:00
|
|
|
|
2016-07-19 14:16:22 +02:00
|
|
|
void updateFontSizeSelector();
|
|
|
|
|
void updateFontStyleSelector();
|
|
|
|
|
void updateFontFamilySelector();
|
|
|
|
|
void updateFont();
|
2009-06-25 17:16:16 +02:00
|
|
|
int closestPointSizeIndex(int desiredPointSize) const;
|
|
|
|
|
|
2010-03-16 14:47:27 +01:00
|
|
|
QFont m_font;
|
|
|
|
|
QFontDatabase m_fontDatabase;
|
2009-06-25 17:16:16 +02:00
|
|
|
|
2010-03-16 14:47:27 +01:00
|
|
|
QString m_homePage;
|
2010-07-23 16:36:08 +02:00
|
|
|
int m_contextOption;
|
2009-06-25 17:16:16 +02:00
|
|
|
|
2012-05-24 16:19:44 +02:00
|
|
|
int m_startOption;
|
2010-09-21 17:00:41 +02:00
|
|
|
bool m_returnOnClose;
|
|
|
|
|
|
2013-12-03 14:17:03 +01:00
|
|
|
QPointer<QWidget> m_widget;
|
2018-04-19 10:47:13 +02:00
|
|
|
Ui::GeneralSettingsPage *m_ui = nullptr;
|
2009-06-25 17:16:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // Internal
|
|
|
|
|
} // Help
|