forked from qt-creator/qt-creator
Help: Inline generalsettingspage UI
Change-Id: Id67a4714aa09e19a2a97c2cb0fa641ddee0584e3 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -6,7 +6,7 @@ add_qtc_plugin(Help
|
|||||||
SOURCES
|
SOURCES
|
||||||
docsettingspage.cpp docsettingspage.h
|
docsettingspage.cpp docsettingspage.h
|
||||||
filtersettingspage.cpp filtersettingspage.h
|
filtersettingspage.cpp filtersettingspage.h
|
||||||
generalsettingspage.cpp generalsettingspage.h generalsettingspage.ui
|
generalsettingspage.cpp generalsettingspage.h
|
||||||
help.qrc
|
help.qrc
|
||||||
helpconstants.h
|
helpconstants.h
|
||||||
helpfindsupport.cpp helpfindsupport.h
|
helpfindsupport.cpp helpfindsupport.h
|
||||||
|
|||||||
@@ -40,9 +40,19 @@
|
|||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
|
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QComboBox>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QFontComboBox>
|
||||||
|
#include <QFormLayout>
|
||||||
|
#include <QGridLayout>
|
||||||
|
#include <QGroupBox>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QLabel>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QSpinBox>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
@@ -52,6 +62,200 @@ using namespace Utils;
|
|||||||
namespace Help {
|
namespace Help {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
class GeneralSettingsPageWidget : public QWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GeneralSettingsPageWidget();
|
||||||
|
|
||||||
|
QSpinBox *zoomSpinBox;
|
||||||
|
QFontComboBox *familyComboBox;
|
||||||
|
QComboBox *styleComboBox;
|
||||||
|
QComboBox *sizeComboBox;
|
||||||
|
QLineEdit *homePageLineEdit;
|
||||||
|
QComboBox *helpStartComboBox;
|
||||||
|
QComboBox *contextHelpComboBox;
|
||||||
|
QPushButton *currentPageButton;
|
||||||
|
QPushButton *blankPageButton;
|
||||||
|
QPushButton *defaultPageButton;
|
||||||
|
QLabel *errorLabel;
|
||||||
|
QPushButton *importButton;
|
||||||
|
QPushButton *exportButton;
|
||||||
|
QCheckBox *scrollWheelZooming;
|
||||||
|
QCheckBox *m_returnOnClose;
|
||||||
|
QComboBox *viewerBackend;
|
||||||
|
};
|
||||||
|
|
||||||
|
GeneralSettingsPageWidget::GeneralSettingsPageWidget()
|
||||||
|
{
|
||||||
|
// font group box
|
||||||
|
auto fontGroupBox = new QGroupBox(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Font"));
|
||||||
|
auto familyLabel = new QLabel(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Family:"));
|
||||||
|
|
||||||
|
familyComboBox = new QFontComboBox;
|
||||||
|
auto styleLabel = new QLabel(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Style:"));
|
||||||
|
styleComboBox = new QComboBox;
|
||||||
|
auto sizeLabel = new QLabel(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Size:"));
|
||||||
|
sizeComboBox = new QComboBox;
|
||||||
|
|
||||||
|
auto fontLayout = new QHBoxLayout();
|
||||||
|
fontLayout->addWidget(familyComboBox);
|
||||||
|
fontLayout->addSpacing(20);
|
||||||
|
fontLayout->addWidget(styleLabel);
|
||||||
|
fontLayout->addWidget(styleComboBox);
|
||||||
|
fontLayout->addSpacing(20);
|
||||||
|
fontLayout->addWidget(sizeLabel);
|
||||||
|
fontLayout->addWidget(sizeComboBox);
|
||||||
|
fontLayout->addStretch();
|
||||||
|
|
||||||
|
auto noteLabel = new QLabel(QCoreApplication::translate(
|
||||||
|
"Help::Internal::GeneralSettingsPage",
|
||||||
|
"Note: The above setting takes effect only if the HTML file does not use a style sheet."));
|
||||||
|
noteLabel->setWordWrap(true);
|
||||||
|
auto zoomLabel = new QLabel(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Zoom:"));
|
||||||
|
|
||||||
|
zoomSpinBox = new QSpinBox;
|
||||||
|
zoomSpinBox->setMinimum(10);
|
||||||
|
zoomSpinBox->setMaximum(3000);
|
||||||
|
zoomSpinBox->setSingleStep(10);
|
||||||
|
zoomSpinBox->setValue(100);
|
||||||
|
zoomSpinBox->setSuffix(QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "%"));
|
||||||
|
|
||||||
|
auto zoomLayout = new QHBoxLayout();
|
||||||
|
zoomLayout->addWidget(zoomSpinBox);
|
||||||
|
zoomLayout->addStretch();
|
||||||
|
|
||||||
|
auto fontGroupBoxLayout = new QGridLayout;
|
||||||
|
fontGroupBox->setLayout(fontGroupBoxLayout);
|
||||||
|
fontGroupBoxLayout->addWidget(familyLabel, 0, 0);
|
||||||
|
fontGroupBoxLayout->addLayout(fontLayout, 0, 1);
|
||||||
|
fontGroupBoxLayout->addWidget(noteLabel, 1, 0, 1, 2);
|
||||||
|
fontGroupBoxLayout->addWidget(zoomLabel, 2, 0);
|
||||||
|
fontGroupBoxLayout->addLayout(zoomLayout, 2, 1);
|
||||||
|
|
||||||
|
// startup group box
|
||||||
|
auto startupGroupBox = new QGroupBox(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Startup"));
|
||||||
|
|
||||||
|
contextHelpComboBox = new QComboBox(startupGroupBox);
|
||||||
|
contextHelpComboBox->addItem(QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"Show Side-by-Side if Possible"));
|
||||||
|
contextHelpComboBox->addItem(QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"Always Show Side-by-Side"));
|
||||||
|
contextHelpComboBox->addItem(QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"Always Show in Help Mode"));
|
||||||
|
contextHelpComboBox->addItem(QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"Always Show in External Window"));
|
||||||
|
|
||||||
|
helpStartComboBox = new QComboBox(startupGroupBox);
|
||||||
|
helpStartComboBox->addItem(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Show My Home Page"));
|
||||||
|
helpStartComboBox->addItem(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Show a Blank Page"));
|
||||||
|
helpStartComboBox->addItem(QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"Show My Tabs from Last Session"));
|
||||||
|
|
||||||
|
auto startupFormLayout = new QFormLayout;
|
||||||
|
startupGroupBox->setLayout(startupFormLayout);
|
||||||
|
startupFormLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||||
|
startupFormLayout->addRow(QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"On context help:"),
|
||||||
|
contextHelpComboBox);
|
||||||
|
startupFormLayout->addRow(QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"On help start:"),
|
||||||
|
helpStartComboBox);
|
||||||
|
|
||||||
|
homePageLineEdit = new QLineEdit;
|
||||||
|
currentPageButton = new QPushButton(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Use &Current Page"));
|
||||||
|
blankPageButton = new QPushButton(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Use &Blank Page"));
|
||||||
|
defaultPageButton = new QPushButton(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Reset"));
|
||||||
|
defaultPageButton->setToolTip(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Reset to default."));
|
||||||
|
|
||||||
|
auto homePageLayout = new QHBoxLayout;
|
||||||
|
homePageLayout->addWidget(homePageLineEdit);
|
||||||
|
homePageLayout->addWidget(currentPageButton);
|
||||||
|
homePageLayout->addWidget(blankPageButton);
|
||||||
|
homePageLayout->addWidget(defaultPageButton);
|
||||||
|
|
||||||
|
startupFormLayout->addRow(QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"Home page:"),
|
||||||
|
homePageLayout);
|
||||||
|
|
||||||
|
// behavior group box
|
||||||
|
auto behaviourGroupBox = new QGroupBox(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Behaviour"));
|
||||||
|
scrollWheelZooming = new QCheckBox(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"Enable scroll wheel zooming"));
|
||||||
|
|
||||||
|
m_returnOnClose = new QCheckBox(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"Return to editor on closing the last page"));
|
||||||
|
m_returnOnClose->setToolTip(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage",
|
||||||
|
"Switches to editor context after last help page is closed."));
|
||||||
|
|
||||||
|
auto viewerBackendLabel = new QLabel(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Viewer backend:"));
|
||||||
|
viewerBackend = new QComboBox;
|
||||||
|
const QString description = GeneralSettingsPage::tr(
|
||||||
|
"Change takes effect after reloading help pages.");
|
||||||
|
auto viewerBackendDescription = new QLabel(description);
|
||||||
|
viewerBackendLabel->setToolTip(description);
|
||||||
|
viewerBackend->setToolTip(description);
|
||||||
|
|
||||||
|
auto viewerBackendLayout = new QHBoxLayout();
|
||||||
|
viewerBackendLayout->addWidget(viewerBackendLabel);
|
||||||
|
viewerBackendLayout->addWidget(viewerBackend);
|
||||||
|
viewerBackendLayout->addWidget(viewerBackendDescription);
|
||||||
|
viewerBackendLayout->addStretch();
|
||||||
|
|
||||||
|
auto behaviourGroupBoxLayout = new QVBoxLayout;
|
||||||
|
behaviourGroupBox->setLayout(behaviourGroupBoxLayout);
|
||||||
|
behaviourGroupBoxLayout->addWidget(scrollWheelZooming);
|
||||||
|
behaviourGroupBoxLayout->addWidget(m_returnOnClose);
|
||||||
|
behaviourGroupBoxLayout->addLayout(viewerBackendLayout);
|
||||||
|
|
||||||
|
// bookmarks
|
||||||
|
errorLabel = new QLabel(this);
|
||||||
|
QPalette palette;
|
||||||
|
QBrush brush(QColor(255, 0, 0, 255));
|
||||||
|
brush.setStyle(Qt::SolidPattern);
|
||||||
|
palette.setBrush(QPalette::Active, QPalette::Text, brush);
|
||||||
|
palette.setBrush(QPalette::Inactive, QPalette::Text, brush);
|
||||||
|
QBrush brush1(QColor(120, 120, 120, 255));
|
||||||
|
brush1.setStyle(Qt::SolidPattern);
|
||||||
|
palette.setBrush(QPalette::Disabled, QPalette::Text, brush1);
|
||||||
|
errorLabel->setPalette(palette);
|
||||||
|
|
||||||
|
importButton = new QPushButton(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Import Bookmarks..."));
|
||||||
|
exportButton = new QPushButton(
|
||||||
|
QCoreApplication::translate("Help::Internal::GeneralSettingsPage", "Export Bookmarks..."));
|
||||||
|
|
||||||
|
auto bookmarksLayout = new QHBoxLayout();
|
||||||
|
bookmarksLayout->addStretch();
|
||||||
|
bookmarksLayout->addWidget(errorLabel);
|
||||||
|
bookmarksLayout->addWidget(importButton);
|
||||||
|
bookmarksLayout->addWidget(exportButton);
|
||||||
|
|
||||||
|
auto mainLayout = new QVBoxLayout;
|
||||||
|
setLayout(mainLayout);
|
||||||
|
mainLayout->addWidget(fontGroupBox);
|
||||||
|
mainLayout->addWidget(startupGroupBox);
|
||||||
|
mainLayout->addWidget(behaviourGroupBox);
|
||||||
|
mainLayout->addLayout(bookmarksLayout);
|
||||||
|
mainLayout->addStretch(1);
|
||||||
|
}
|
||||||
|
|
||||||
GeneralSettingsPage::GeneralSettingsPage()
|
GeneralSettingsPage::GeneralSettingsPage()
|
||||||
{
|
{
|
||||||
setId("A.General settings");
|
setId("A.General settings");
|
||||||
@@ -64,96 +268,88 @@ GeneralSettingsPage::GeneralSettingsPage()
|
|||||||
QWidget *GeneralSettingsPage::widget()
|
QWidget *GeneralSettingsPage::widget()
|
||||||
{
|
{
|
||||||
if (!m_widget) {
|
if (!m_widget) {
|
||||||
m_widget = new QWidget;
|
m_widget = new GeneralSettingsPageWidget;
|
||||||
m_ui = new Ui::GeneralSettingsPage;
|
|
||||||
m_ui->setupUi(m_widget);
|
|
||||||
m_ui->sizeComboBox->setEditable(false);
|
|
||||||
m_ui->styleComboBox->setEditable(false);
|
|
||||||
|
|
||||||
m_font = LocalHelpManager::fallbackFont();
|
m_font = LocalHelpManager::fallbackFont();
|
||||||
m_fontZoom = LocalHelpManager::fontZoom();
|
m_fontZoom = LocalHelpManager::fontZoom();
|
||||||
m_ui->zoomSpinBox->setValue(m_fontZoom);
|
m_widget->zoomSpinBox->setValue(m_fontZoom);
|
||||||
|
|
||||||
updateFontSizeSelector();
|
updateFontSizeSelector();
|
||||||
updateFontStyleSelector();
|
updateFontStyleSelector();
|
||||||
updateFontFamilySelector();
|
updateFontFamilySelector();
|
||||||
|
|
||||||
connect(m_ui->familyComboBox, &QFontComboBox::currentFontChanged, this, [this]() {
|
connect(m_widget->familyComboBox, &QFontComboBox::currentFontChanged, this, [this]() {
|
||||||
updateFont();
|
updateFont();
|
||||||
updateFontStyleSelector();
|
updateFontStyleSelector();
|
||||||
updateFontSizeSelector();
|
updateFontSizeSelector();
|
||||||
updateFont(); // changes that might have happened when updating the selectors
|
updateFont(); // changes that might have happened when updating the selectors
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_ui->styleComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_widget->styleComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
this, [this]() {
|
this, [this]() {
|
||||||
updateFont();
|
updateFont();
|
||||||
updateFontSizeSelector();
|
updateFontSizeSelector();
|
||||||
updateFont(); // changes that might have happened when updating the selectors
|
updateFont(); // changes that might have happened when updating the selectors
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_ui->sizeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
connect(m_widget->sizeComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||||
this, &GeneralSettingsPage::updateFont);
|
this, &GeneralSettingsPage::updateFont);
|
||||||
|
|
||||||
connect(m_ui->zoomSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
connect(m_widget->zoomSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||||
this, [this](int value) { m_fontZoom = value; });
|
this, [this](int value) { m_fontZoom = value; });
|
||||||
|
|
||||||
m_homePage = LocalHelpManager::homePage();
|
m_homePage = LocalHelpManager::homePage();
|
||||||
m_ui->homePageLineEdit->setText(m_homePage);
|
m_widget->homePageLineEdit->setText(m_homePage);
|
||||||
|
|
||||||
m_startOption = LocalHelpManager::startOption();
|
m_startOption = LocalHelpManager::startOption();
|
||||||
m_ui->helpStartComboBox->setCurrentIndex(m_startOption);
|
m_widget->helpStartComboBox->setCurrentIndex(m_startOption);
|
||||||
|
|
||||||
m_contextOption = LocalHelpManager::contextHelpOption();
|
m_contextOption = LocalHelpManager::contextHelpOption();
|
||||||
m_ui->contextHelpComboBox->setCurrentIndex(m_contextOption);
|
m_widget->contextHelpComboBox->setCurrentIndex(m_contextOption);
|
||||||
|
|
||||||
connect(m_ui->currentPageButton, &QPushButton::clicked,
|
connect(m_widget->currentPageButton, &QPushButton::clicked,
|
||||||
this, &GeneralSettingsPage::setCurrentPage);
|
this, &GeneralSettingsPage::setCurrentPage);
|
||||||
connect(m_ui->blankPageButton, &QPushButton::clicked,
|
connect(m_widget->blankPageButton, &QPushButton::clicked,
|
||||||
this, &GeneralSettingsPage::setBlankPage);
|
this, &GeneralSettingsPage::setBlankPage);
|
||||||
connect(m_ui->defaultPageButton,
|
connect(m_widget->defaultPageButton,
|
||||||
&QPushButton::clicked,
|
&QPushButton::clicked,
|
||||||
this,
|
this,
|
||||||
&GeneralSettingsPage::setDefaultPage);
|
&GeneralSettingsPage::setDefaultPage);
|
||||||
|
|
||||||
HelpViewer *viewer = HelpPlugin::modeHelpWidget()->currentViewer();
|
HelpViewer *viewer = HelpPlugin::modeHelpWidget()->currentViewer();
|
||||||
if (!viewer)
|
if (!viewer)
|
||||||
m_ui->currentPageButton->setEnabled(false);
|
m_widget->currentPageButton->setEnabled(false);
|
||||||
|
|
||||||
m_ui->errorLabel->setVisible(false);
|
m_widget->errorLabel->setVisible(false);
|
||||||
connect(m_ui->importButton, &QPushButton::clicked,
|
connect(m_widget->importButton, &QPushButton::clicked,
|
||||||
this, &GeneralSettingsPage::importBookmarks);
|
this, &GeneralSettingsPage::importBookmarks);
|
||||||
connect(m_ui->exportButton, &QPushButton::clicked,
|
connect(m_widget->exportButton, &QPushButton::clicked,
|
||||||
this, &GeneralSettingsPage::exportBookmarks);
|
this, &GeneralSettingsPage::exportBookmarks);
|
||||||
|
|
||||||
m_returnOnClose = LocalHelpManager::returnOnClose();
|
m_returnOnClose = LocalHelpManager::returnOnClose();
|
||||||
m_ui->m_returnOnClose->setChecked(m_returnOnClose);
|
m_widget->m_returnOnClose->setChecked(m_returnOnClose);
|
||||||
|
|
||||||
m_scrollWheelZoomingEnabled = LocalHelpManager::isScrollWheelZoomingEnabled();
|
m_scrollWheelZoomingEnabled = LocalHelpManager::isScrollWheelZoomingEnabled();
|
||||||
m_ui->scrollWheelZooming->setChecked(m_scrollWheelZoomingEnabled);
|
m_widget->scrollWheelZooming->setChecked(m_scrollWheelZoomingEnabled);
|
||||||
|
|
||||||
const QString description = tr("Change takes effect after reloading help pages.");
|
m_widget->viewerBackend->addItem(tr("Default (%1)", "Default viewer backend")
|
||||||
m_ui->viewerBackendDescription->setText(description);
|
|
||||||
m_ui->viewerBackendLabel->setToolTip(description);
|
|
||||||
m_ui->viewerBackend->setToolTip(description);
|
|
||||||
m_ui->viewerBackend->addItem(tr("Default (%1)", "Default viewer backend")
|
|
||||||
.arg(LocalHelpManager::defaultViewerBackend().displayName));
|
.arg(LocalHelpManager::defaultViewerBackend().displayName));
|
||||||
const QByteArray currentBackend = LocalHelpManager::viewerBackendId();
|
const QByteArray currentBackend = LocalHelpManager::viewerBackendId();
|
||||||
const QVector<HelpViewerFactory> backends = LocalHelpManager::viewerBackends();
|
const QVector<HelpViewerFactory> backends = LocalHelpManager::viewerBackends();
|
||||||
for (const HelpViewerFactory &f : backends) {
|
for (const HelpViewerFactory &f : backends) {
|
||||||
m_ui->viewerBackend->addItem(f.displayName, f.id);
|
m_widget->viewerBackend->addItem(f.displayName, f.id);
|
||||||
if (f.id == currentBackend)
|
if (f.id == currentBackend)
|
||||||
m_ui->viewerBackend->setCurrentIndex(m_ui->viewerBackend->count() - 1);
|
m_widget->viewerBackend->setCurrentIndex(m_widget->viewerBackend->count() - 1);
|
||||||
}
|
}
|
||||||
if (backends.size() == 1)
|
if (backends.size() == 1)
|
||||||
m_ui->viewerBackend->setEnabled(false);
|
m_widget->viewerBackend->setEnabled(false);
|
||||||
}
|
}
|
||||||
return m_widget;
|
return m_widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettingsPage::apply()
|
void GeneralSettingsPage::apply()
|
||||||
{
|
{
|
||||||
if (!m_ui) // page was never shown
|
if (!m_widget) // page was never shown
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_font != LocalHelpManager::fallbackFont())
|
if (m_font != LocalHelpManager::fallbackFont())
|
||||||
@@ -162,40 +358,40 @@ void GeneralSettingsPage::apply()
|
|||||||
if (m_fontZoom != LocalHelpManager::fontZoom())
|
if (m_fontZoom != LocalHelpManager::fontZoom())
|
||||||
LocalHelpManager::setFontZoom(m_fontZoom);
|
LocalHelpManager::setFontZoom(m_fontZoom);
|
||||||
|
|
||||||
QString homePage = QUrl::fromUserInput(m_ui->homePageLineEdit->text()).toString();
|
QString homePage = QUrl::fromUserInput(m_widget->homePageLineEdit->text()).toString();
|
||||||
if (homePage.isEmpty())
|
if (homePage.isEmpty())
|
||||||
homePage = Help::Constants::AboutBlank;
|
homePage = Help::Constants::AboutBlank;
|
||||||
m_ui->homePageLineEdit->setText(homePage);
|
m_widget->homePageLineEdit->setText(homePage);
|
||||||
if (m_homePage != homePage) {
|
if (m_homePage != homePage) {
|
||||||
m_homePage = homePage;
|
m_homePage = homePage;
|
||||||
LocalHelpManager::setHomePage(homePage);
|
LocalHelpManager::setHomePage(homePage);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int startOption = m_ui->helpStartComboBox->currentIndex();
|
const int startOption = m_widget->helpStartComboBox->currentIndex();
|
||||||
if (m_startOption != startOption) {
|
if (m_startOption != startOption) {
|
||||||
m_startOption = startOption;
|
m_startOption = startOption;
|
||||||
LocalHelpManager::setStartOption(LocalHelpManager::StartOption(m_startOption));
|
LocalHelpManager::setStartOption(LocalHelpManager::StartOption(m_startOption));
|
||||||
}
|
}
|
||||||
|
|
||||||
const int helpOption = m_ui->contextHelpComboBox->currentIndex();
|
const int helpOption = m_widget->contextHelpComboBox->currentIndex();
|
||||||
if (m_contextOption != helpOption) {
|
if (m_contextOption != helpOption) {
|
||||||
m_contextOption = helpOption;
|
m_contextOption = helpOption;
|
||||||
LocalHelpManager::setContextHelpOption(HelpManager::HelpViewerLocation(m_contextOption));
|
LocalHelpManager::setContextHelpOption(HelpManager::HelpViewerLocation(m_contextOption));
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool close = m_ui->m_returnOnClose->isChecked();
|
const bool close = m_widget->m_returnOnClose->isChecked();
|
||||||
if (m_returnOnClose != close) {
|
if (m_returnOnClose != close) {
|
||||||
m_returnOnClose = close;
|
m_returnOnClose = close;
|
||||||
LocalHelpManager::setReturnOnClose(m_returnOnClose);
|
LocalHelpManager::setReturnOnClose(m_returnOnClose);
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool zoom = m_ui->scrollWheelZooming->isChecked();
|
const bool zoom = m_widget->scrollWheelZooming->isChecked();
|
||||||
if (m_scrollWheelZoomingEnabled != zoom) {
|
if (m_scrollWheelZoomingEnabled != zoom) {
|
||||||
m_scrollWheelZoomingEnabled = zoom;
|
m_scrollWheelZoomingEnabled = zoom;
|
||||||
LocalHelpManager::setScrollWheelZoomingEnabled(m_scrollWheelZoomingEnabled);
|
LocalHelpManager::setScrollWheelZoomingEnabled(m_scrollWheelZoomingEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray viewerBackendId = m_ui->viewerBackend->currentData().toByteArray();
|
const QByteArray viewerBackendId = m_widget->viewerBackend->currentData().toByteArray();
|
||||||
LocalHelpManager::setViewerBackendId(viewerBackendId);
|
LocalHelpManager::setViewerBackendId(viewerBackendId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,22 +399,22 @@ void GeneralSettingsPage::setCurrentPage()
|
|||||||
{
|
{
|
||||||
HelpViewer *viewer = HelpPlugin::modeHelpWidget()->currentViewer();
|
HelpViewer *viewer = HelpPlugin::modeHelpWidget()->currentViewer();
|
||||||
if (viewer)
|
if (viewer)
|
||||||
m_ui->homePageLineEdit->setText(viewer->source().toString());
|
m_widget->homePageLineEdit->setText(viewer->source().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettingsPage::setBlankPage()
|
void GeneralSettingsPage::setBlankPage()
|
||||||
{
|
{
|
||||||
m_ui->homePageLineEdit->setText(Help::Constants::AboutBlank);
|
m_widget->homePageLineEdit->setText(Help::Constants::AboutBlank);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettingsPage::setDefaultPage()
|
void GeneralSettingsPage::setDefaultPage()
|
||||||
{
|
{
|
||||||
m_ui->homePageLineEdit->setText(LocalHelpManager::defaultHomePage());
|
m_widget->homePageLineEdit->setText(LocalHelpManager::defaultHomePage());
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettingsPage::importBookmarks()
|
void GeneralSettingsPage::importBookmarks()
|
||||||
{
|
{
|
||||||
m_ui->errorLabel->setVisible(false);
|
m_widget->errorLabel->setVisible(false);
|
||||||
|
|
||||||
FilePath filePath = FileUtils::getOpenFilePath(nullptr,
|
FilePath filePath = FileUtils::getOpenFilePath(nullptr,
|
||||||
tr("Import Bookmarks"), FilePath::fromString(QDir::currentPath()), tr("Files (*.xbel)"));
|
tr("Import Bookmarks"), FilePath::fromString(QDir::currentPath()), tr("Files (*.xbel)"));
|
||||||
@@ -234,13 +430,13 @@ void GeneralSettingsPage::importBookmarks()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ui->errorLabel->setVisible(true);
|
m_widget->errorLabel->setVisible(true);
|
||||||
m_ui->errorLabel->setText(tr("Cannot import bookmarks."));
|
m_widget->errorLabel->setText(tr("Cannot import bookmarks."));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettingsPage::exportBookmarks()
|
void GeneralSettingsPage::exportBookmarks()
|
||||||
{
|
{
|
||||||
m_ui->errorLabel->setVisible(false);
|
m_widget->errorLabel->setVisible(false);
|
||||||
|
|
||||||
FilePath filePath = FileUtils::getSaveFilePath(nullptr,
|
FilePath filePath = FileUtils::getSaveFilePath(nullptr,
|
||||||
tr("Save File"), "untitled.xbel", tr("Files (*.xbel)"));
|
tr("Save File"), "untitled.xbel", tr("Files (*.xbel)"));
|
||||||
@@ -256,8 +452,8 @@ void GeneralSettingsPage::exportBookmarks()
|
|||||||
saver.setResult(&writer);
|
saver.setResult(&writer);
|
||||||
}
|
}
|
||||||
if (!saver.finalize()) {
|
if (!saver.finalize()) {
|
||||||
m_ui->errorLabel->setVisible(true);
|
m_widget->errorLabel->setVisible(true);
|
||||||
m_ui->errorLabel->setText(saver.errorString());
|
m_widget->errorLabel->setText(saver.errorString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,19 +466,19 @@ void GeneralSettingsPage::updateFontSizeSelector()
|
|||||||
if (pointSizes.empty())
|
if (pointSizes.empty())
|
||||||
pointSizes = QFontDatabase::standardSizes();
|
pointSizes = QFontDatabase::standardSizes();
|
||||||
|
|
||||||
QSignalBlocker blocker(m_ui->sizeComboBox);
|
QSignalBlocker blocker(m_widget->sizeComboBox);
|
||||||
m_ui->sizeComboBox->clear();
|
m_widget->sizeComboBox->clear();
|
||||||
m_ui->sizeComboBox->setCurrentIndex(-1);
|
m_widget->sizeComboBox->setCurrentIndex(-1);
|
||||||
m_ui->sizeComboBox->setEnabled(!pointSizes.empty());
|
m_widget->sizeComboBox->setEnabled(!pointSizes.empty());
|
||||||
|
|
||||||
// try to maintain selection or select closest.
|
// try to maintain selection or select closest.
|
||||||
if (!pointSizes.empty()) {
|
if (!pointSizes.empty()) {
|
||||||
QString n;
|
QString n;
|
||||||
foreach (int pointSize, pointSizes)
|
foreach (int pointSize, pointSizes)
|
||||||
m_ui->sizeComboBox->addItem(n.setNum(pointSize), QVariant(pointSize));
|
m_widget->sizeComboBox->addItem(n.setNum(pointSize), QVariant(pointSize));
|
||||||
const int closestIndex = closestPointSizeIndex(m_font.pointSize());
|
const int closestIndex = closestPointSizeIndex(m_font.pointSize());
|
||||||
if (closestIndex != -1)
|
if (closestIndex != -1)
|
||||||
m_ui->sizeComboBox->setCurrentIndex(closestIndex);
|
m_widget->sizeComboBox->setCurrentIndex(closestIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,49 +487,49 @@ void GeneralSettingsPage::updateFontStyleSelector()
|
|||||||
const QString &fontStyle = m_fontDatabase.styleString(m_font);
|
const QString &fontStyle = m_fontDatabase.styleString(m_font);
|
||||||
const QStringList &styles = m_fontDatabase.styles(m_font.family());
|
const QStringList &styles = m_fontDatabase.styles(m_font.family());
|
||||||
|
|
||||||
QSignalBlocker blocker(m_ui->styleComboBox);
|
QSignalBlocker blocker(m_widget->styleComboBox);
|
||||||
m_ui->styleComboBox->clear();
|
m_widget->styleComboBox->clear();
|
||||||
m_ui->styleComboBox->setCurrentIndex(-1);
|
m_widget->styleComboBox->setCurrentIndex(-1);
|
||||||
m_ui->styleComboBox->setEnabled(!styles.empty());
|
m_widget->styleComboBox->setEnabled(!styles.empty());
|
||||||
|
|
||||||
if (!styles.empty()) {
|
if (!styles.empty()) {
|
||||||
int normalIndex = -1;
|
int normalIndex = -1;
|
||||||
const QString normalStyle = "Normal";
|
const QString normalStyle = "Normal";
|
||||||
foreach (const QString &style, styles) {
|
foreach (const QString &style, styles) {
|
||||||
// try to maintain selection or select 'normal' preferably
|
// try to maintain selection or select 'normal' preferably
|
||||||
const int newIndex = m_ui->styleComboBox->count();
|
const int newIndex = m_widget->styleComboBox->count();
|
||||||
m_ui->styleComboBox->addItem(style);
|
m_widget->styleComboBox->addItem(style);
|
||||||
if (fontStyle == style) {
|
if (fontStyle == style) {
|
||||||
m_ui->styleComboBox->setCurrentIndex(newIndex);
|
m_widget->styleComboBox->setCurrentIndex(newIndex);
|
||||||
} else {
|
} else {
|
||||||
if (fontStyle == normalStyle)
|
if (fontStyle == normalStyle)
|
||||||
normalIndex = newIndex;
|
normalIndex = newIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_ui->styleComboBox->currentIndex() == -1 && normalIndex != -1)
|
if (m_widget->styleComboBox->currentIndex() == -1 && normalIndex != -1)
|
||||||
m_ui->styleComboBox->setCurrentIndex(normalIndex);
|
m_widget->styleComboBox->setCurrentIndex(normalIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettingsPage::updateFontFamilySelector()
|
void GeneralSettingsPage::updateFontFamilySelector()
|
||||||
{
|
{
|
||||||
m_ui->familyComboBox->setCurrentFont(m_font);
|
m_widget->familyComboBox->setCurrentFont(m_font);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralSettingsPage::updateFont()
|
void GeneralSettingsPage::updateFont()
|
||||||
{
|
{
|
||||||
const QString &family = m_ui->familyComboBox->currentFont().family();
|
const QString &family = m_widget->familyComboBox->currentFont().family();
|
||||||
m_font.setFamily(family);
|
m_font.setFamily(family);
|
||||||
|
|
||||||
int fontSize = 14;
|
int fontSize = 14;
|
||||||
int currentIndex = m_ui->sizeComboBox->currentIndex();
|
int currentIndex = m_widget->sizeComboBox->currentIndex();
|
||||||
if (currentIndex != -1)
|
if (currentIndex != -1)
|
||||||
fontSize = m_ui->sizeComboBox->itemData(currentIndex).toInt();
|
fontSize = m_widget->sizeComboBox->itemData(currentIndex).toInt();
|
||||||
m_font.setPointSize(fontSize);
|
m_font.setPointSize(fontSize);
|
||||||
|
|
||||||
currentIndex = m_ui->styleComboBox->currentIndex();
|
currentIndex = m_widget->styleComboBox->currentIndex();
|
||||||
if (currentIndex != -1)
|
if (currentIndex != -1)
|
||||||
m_font.setStyleName(m_ui->styleComboBox->itemText(currentIndex));
|
m_font.setStyleName(m_widget->styleComboBox->itemText(currentIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
int GeneralSettingsPage::closestPointSizeIndex(int desiredPointSize) const
|
int GeneralSettingsPage::closestPointSizeIndex(int desiredPointSize) const
|
||||||
@@ -342,9 +538,9 @@ int GeneralSettingsPage::closestPointSizeIndex(int desiredPointSize) const
|
|||||||
int closestIndex = -1;
|
int closestIndex = -1;
|
||||||
int closestAbsError = 0xFFFF;
|
int closestAbsError = 0xFFFF;
|
||||||
|
|
||||||
const int pointSizeCount = m_ui->sizeComboBox->count();
|
const int pointSizeCount = m_widget->sizeComboBox->count();
|
||||||
for (int i = 0; i < pointSizeCount; i++) {
|
for (int i = 0; i < pointSizeCount; i++) {
|
||||||
const int itemPointSize = m_ui->sizeComboBox->itemData(i).toInt();
|
const int itemPointSize = m_widget->sizeComboBox->itemData(i).toInt();
|
||||||
const int absError = qAbs(desiredPointSize - itemPointSize);
|
const int absError = qAbs(desiredPointSize - itemPointSize);
|
||||||
if (absError < closestAbsError) {
|
if (absError < closestAbsError) {
|
||||||
closestIndex = i;
|
closestIndex = i;
|
||||||
@@ -362,10 +558,6 @@ int GeneralSettingsPage::closestPointSizeIndex(int desiredPointSize) const
|
|||||||
void GeneralSettingsPage::finish()
|
void GeneralSettingsPage::finish()
|
||||||
{
|
{
|
||||||
delete m_widget;
|
delete m_widget;
|
||||||
if (!m_ui) // page was never shown
|
|
||||||
return;
|
|
||||||
delete m_ui;
|
|
||||||
m_ui = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
|||||||
@@ -25,14 +25,16 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ui_generalsettingspage.h"
|
|
||||||
#include <coreplugin/dialogs/ioptionspage.h>
|
#include <coreplugin/dialogs/ioptionspage.h>
|
||||||
|
|
||||||
|
#include <QFontDatabase>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
|
|
||||||
namespace Help {
|
namespace Help {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
|
class GeneralSettingsPageWidget;
|
||||||
|
|
||||||
class GeneralSettingsPage : public Core::IOptionsPage
|
class GeneralSettingsPage : public Core::IOptionsPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -68,8 +70,7 @@ private:
|
|||||||
bool m_returnOnClose;
|
bool m_returnOnClose;
|
||||||
bool m_scrollWheelZoomingEnabled;
|
bool m_scrollWheelZoomingEnabled;
|
||||||
|
|
||||||
QPointer<QWidget> m_widget;
|
QPointer<GeneralSettingsPageWidget> m_widget;
|
||||||
Ui::GeneralSettingsPage *m_ui = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
|||||||
@@ -1,500 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>Help::Internal::GeneralSettingsPage</class>
|
|
||||||
<widget class="QWidget" name="Help::Internal::GeneralSettingsPage">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>706</width>
|
|
||||||
<height>594</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="fontGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Font</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="familyLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Family:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QFontComboBox" name="familyComboBox"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="spacer1">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="styleLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Style:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="styleComboBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="spacer2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="sizeLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Size:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="sizeComboBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="spacer3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>13</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Note: The above setting takes effect only if the HTML file does not use a style sheet.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="zoomLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Zoom:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="zoomSpinBox">
|
|
||||||
<property name="suffix">
|
|
||||||
<string>%</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>3000</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>100</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="spacer3_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>13</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="startupGroupBox">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Startup</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QFormLayout" name="startupFormLayout">
|
|
||||||
<property name="fieldGrowthPolicy">
|
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="contextHelpLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>On context help:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="contextHelpComboBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Show Side-by-Side if Possible</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Always Show Side-by-Side</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Always Show in Help Mode</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Always Show in External Window</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="startPageLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>On help start:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="helpStartComboBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Show My Home Page</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Show a Blank Page</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Show My Tabs from Last Session</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="homePageLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Home page:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="homePageLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="currentPageButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use &Current Page</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="blankPageButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use &Blank Page</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="defaultPageButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Reset to default.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Reset</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="behaviourGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Behaviour</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="scrollWheelZooming">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable scroll wheel zooming</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="m_returnOnClose">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Switches to editor context after last help page is closed.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Return to editor on closing the last page</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="viewerBackendLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Viewer backend:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="viewerBackend"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="viewerBackendDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="bookmarkHorizontalLayout">
|
|
||||||
<item>
|
|
||||||
<spacer name="spacer5">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>244</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="errorLabel">
|
|
||||||
<property name="palette">
|
|
||||||
<palette>
|
|
||||||
<active>
|
|
||||||
<colorrole role="Text">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</active>
|
|
||||||
<inactive>
|
|
||||||
<colorrole role="Text">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>255</red>
|
|
||||||
<green>0</green>
|
|
||||||
<blue>0</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</inactive>
|
|
||||||
<disabled>
|
|
||||||
<colorrole role="Text">
|
|
||||||
<brush brushstyle="SolidPattern">
|
|
||||||
<color alpha="255">
|
|
||||||
<red>120</red>
|
|
||||||
<green>120</green>
|
|
||||||
<blue>120</blue>
|
|
||||||
</color>
|
|
||||||
</brush>
|
|
||||||
</colorrole>
|
|
||||||
</disabled>
|
|
||||||
</palette>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="importButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Import Bookmarks...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="exportButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Export Bookmarks...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="spacer6">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>familyComboBox</tabstop>
|
|
||||||
<tabstop>styleComboBox</tabstop>
|
|
||||||
<tabstop>sizeComboBox</tabstop>
|
|
||||||
<tabstop>contextHelpComboBox</tabstop>
|
|
||||||
<tabstop>helpStartComboBox</tabstop>
|
|
||||||
<tabstop>homePageLineEdit</tabstop>
|
|
||||||
<tabstop>currentPageButton</tabstop>
|
|
||||||
<tabstop>blankPageButton</tabstop>
|
|
||||||
<tabstop>defaultPageButton</tabstop>
|
|
||||||
<tabstop>m_returnOnClose</tabstop>
|
|
||||||
<tabstop>importButton</tabstop>
|
|
||||||
<tabstop>exportButton</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
@@ -37,7 +37,7 @@ Project {
|
|||||||
files: [
|
files: [
|
||||||
"docsettingspage.cpp", "docsettingspage.h",
|
"docsettingspage.cpp", "docsettingspage.h",
|
||||||
"filtersettingspage.cpp", "filtersettingspage.h",
|
"filtersettingspage.cpp", "filtersettingspage.h",
|
||||||
"generalsettingspage.cpp", "generalsettingspage.h", "generalsettingspage.ui",
|
"generalsettingspage.cpp", "generalsettingspage.h",
|
||||||
"help.qrc",
|
"help.qrc",
|
||||||
"helpconstants.h",
|
"helpconstants.h",
|
||||||
"helpfindsupport.cpp", "helpfindsupport.h",
|
"helpfindsupport.cpp", "helpfindsupport.h",
|
||||||
|
|||||||
Reference in New Issue
Block a user