ui: Added scroll speed setting to preferences

This commit is contained in:
Eberhard Graether
2016-08-18 12:12:19 +02:00
parent 3d40f4ed4e
commit c269493942
20 changed files with 206 additions and 27 deletions
+30 -16
View File
@@ -7,34 +7,47 @@
<!-- COLOR: int int int int - rgba e.g. 125 125 125 255 --> <!-- COLOR: int int int int - rgba e.g. 125 125 125 255 -->
<config> <config>
<source>
<compiler_flags>
<compiler_flag><!-- STRING: compiler flag, including the dash e.g. -v --></compiler_flag>
</compiler_flags>
<header_search_paths>
<header_search_path><!-- STRING: header search path for each path a header_search_path element --></header_search_path>
</header_search_paths>
<!-- MAC ONLY -->
<framework_search_paths>
<framework_search_path><!-- STRING: framework search path --></framework_search_path>
</framework_search_paths>
</source>
<application> <application>
<font_name><!-- STRING: font name --></font_name> <font_name><!-- STRING: font name --></font_name>
<font_size><!-- INTEGER: font size in pt --></font_size> <font_size><!-- INTEGER: font size in pt --></font_size>
<color_scheme><!-- STRING: color scheme path --></color_scheme> <color_scheme><!-- STRING: color scheme path --></color_scheme>
<font_size_max><!-- INTEGER: maximum font size in pt --></font_size_max> <font_size_max><!-- INTEGER: maximum font size in pt --></font_size_max>
<font_size_min><!-- INTEGER: minimum font size in pt --></font_size_min> <font_size_min><!-- INTEGER: minimum font size in pt --></font_size_min>
<font_size_std><!-- INTEGER: standard font size in pt --></font_size_std> <font_size_std><!-- INTEGER: standard font size in pt --></font_size_std>
<indexer_thread_count><!-- INTEGER: number of threads indexing the source code --></indexer_thread_count>
<show_external_non_fatal_errors><!-- BOOL: show non-fatal errors in unindexed files --></show_external_non_fatal_errors> <show_external_non_fatal_errors><!-- BOOL: show non-fatal errors in unindexed files --></show_external_non_fatal_errors>
<window_base_width><!-- INTEGER: initial width of an overlay window --></window_base_width> <window_base_width><!-- INTEGER: initial width of an overlay window --></window_base_width>
<window_base_height><!-- INTEGER: initial height of an overlay window --></window_base_height> <window_base_height><!-- INTEGER: initial height of an overlay window --></window_base_height>
<scroll_speed><!-- DECIMAL: multiplier for default scroll speed in views --></scroll_speed>
</application> </application>
<indexing>
<indexer_thread_count><!-- INTEGER: number of threads indexing the source code --></indexer_thread_count>
<cxx>
<compiler_flags>
<compiler_flag><!-- STRING: compiler flag, including the dash e.g. -v --></compiler_flag>
</compiler_flags>
<header_search_paths>
<header_search_path><!-- STRING: header search path for each path a header_search_path element --></header_search_path>
</header_search_paths>
<!-- MAC ONLY -->
<framework_search_paths>
<framework_search_path><!-- STRING: framework search path --></framework_search_path>
</framework_search_paths>
</cxx>
<java>
<java_path><!-- STRING: path java installation on Windows e.g. .../java/JDK/jre/bin --></java_path>
<java_maximum_memory><!-- INTEGER: memory in MB used by java indexer --></java_maximum_memory>
</java>
</indexing>
<code> <code>
<tab_width><!-- INTEGER: number of spaces to represent a tab in code files --></tab_width> <tab_width><!-- INTEGER: number of spaces to represent a tab in code files --></tab_width>
@@ -48,6 +61,7 @@
<recent_projects> <recent_projects>
<recent_project><!-- STRING: recent project path --></recent_project> <recent_project><!-- STRING: recent project path --></recent_project>
</recent_projects> </recent_projects>
<license> <license>
<check><!-- STRING: hashed path of the working directory used when entering the license key --></check> <check><!-- STRING: hashed path of the working directory used when entering the license key --></check>
<license><!-- STRING: the license key --></license> <license><!-- STRING: the license key --></license>
+2
View File
@@ -5,6 +5,7 @@
#include "utility/messaging/MessageQueue.h" #include "utility/messaging/MessageQueue.h"
#include "utility/messaging/type/MessageActivateNodes.h" #include "utility/messaging/type/MessageActivateNodes.h"
#include "utility/messaging/type/MessageDispatchWhenLicenseValid.h" #include "utility/messaging/type/MessageDispatchWhenLicenseValid.h"
#include "utility/messaging/type/MessageScrollSpeedChange.h"
#include "utility/messaging/type/MessageStatus.h" #include "utility/messaging/type/MessageStatus.h"
#include "utility/messaging/type/MessageShowStartScreen.h" #include "utility/messaging/type/MessageShowStartScreen.h"
#include "utility/scheduling/TaskScheduler.h" #include "utility/scheduling/TaskScheduler.h"
@@ -72,6 +73,7 @@ void Application::loadSettings()
{ {
std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance(); std::shared_ptr<ApplicationSettings> settings = ApplicationSettings::getInstance();
settings->load(FilePath(UserPaths::getAppSettingsPath())); settings->load(FilePath(UserPaths::getAppSettingsPath()));
loadStyle(settings->getColorSchemePath()); loadStyle(settings->getColorSchemePath());
} }
+10
View File
@@ -113,6 +113,16 @@ int ApplicationSettings::getWindowBaseHeight() const
return getValue<int>("application/window_base_height", 500); return getValue<int>("application/window_base_height", 500);
} }
float ApplicationSettings::getScrollSpeed() const
{
return getValue<float>("application/scroll_speed", 1.0f);
}
void ApplicationSettings::setScrollSpeed(float scrollSpeed)
{
setValue<float>("application/scroll_speed", scrollSpeed);
}
int ApplicationSettings::getIndexerThreadCount() const int ApplicationSettings::getIndexerThreadCount() const
{ {
return getValue<int>("indexing/indexer_thread_count", 4); return getValue<int>("indexing/indexer_thread_count", 4);
+4
View File
@@ -39,6 +39,10 @@ public:
int getWindowBaseWidth() const; int getWindowBaseWidth() const;
int getWindowBaseHeight() const; int getWindowBaseHeight() const;
float getScrollSpeed() const;
void setScrollSpeed(float scrollSpeed);
// indexing
int getIndexerThreadCount() const; int getIndexerThreadCount() const;
void setIndexerThreadCount(const int count); void setIndexerThreadCount(const int count);
@@ -0,0 +1,28 @@
#ifndef MESSAGE_SCROLL_SPEED_CHANGE_H
#define MESSAGE_SCROLL_SPEED_CHANGE_H
#include "utility/messaging/Message.h"
class MessageScrollSpeedChange
: public Message<MessageScrollSpeedChange>
{
public:
MessageScrollSpeedChange(float scrollSpeed)
: scrollSpeed(scrollSpeed)
{
}
static const std::string getStaticType()
{
return "MessageScrollSpeedChange";
}
virtual void print(std::ostream& os) const
{
os << scrollSpeed;
}
const float scrollSpeed;
};
#endif // MESSAGE_SCROLL_SPEED_CHANGE_H
+2
View File
@@ -60,6 +60,8 @@ add_files(
qt/utility/QtDeviceScaledPixmap.h qt/utility/QtDeviceScaledPixmap.h
qt/utility/QtHighlighter.cpp qt/utility/QtHighlighter.cpp
qt/utility/QtHighlighter.h qt/utility/QtHighlighter.h
qt/utility/QtScrollSpeedChangeListener.cpp
qt/utility/QtScrollSpeedChangeListener.h
qt/utility/QtThreadedFunctor.h qt/utility/QtThreadedFunctor.h
qt/utility/utilityQt.cpp qt/utility/utilityQt.cpp
qt/utility/utilityQt.h qt/utility/utilityQt.h
@@ -204,6 +204,9 @@ QtAutocompletionList::QtAutocompletionList(QWidget* parent)
setModelSorting(QCompleter::UnsortedModel); setModelSorting(QCompleter::UnsortedModel);
setCompletionPrefix(""); setCompletionPrefix("");
setMaxVisibleItems(20); setMaxVisibleItems(20);
m_scrollSpeedChangeListenerHorizontal.setScrollBar(list->horizontalScrollBar());
m_scrollSpeedChangeListenerVertical.setScrollBar(list->verticalScrollBar());
} }
QtAutocompletionList::~QtAutocompletionList() QtAutocompletionList::~QtAutocompletionList()
@@ -10,6 +10,7 @@
#include <QListView> #include <QListView>
#include "data/search/SearchMatch.h" #include "data/search/SearchMatch.h"
#include "qt/utility/QtScrollSpeedChangeListener.h"
class QtAutocompletionModel class QtAutocompletionModel
: public QAbstractTableModel : public QAbstractTableModel
@@ -70,6 +71,9 @@ private slots:
private: private:
std::shared_ptr<QtAutocompletionModel> m_model; std::shared_ptr<QtAutocompletionModel> m_model;
std::shared_ptr<QtAutocompletionDelegate> m_delegate; std::shared_ptr<QtAutocompletionDelegate> m_delegate;
QtScrollSpeedChangeListener m_scrollSpeedChangeListenerHorizontal;
QtScrollSpeedChangeListener m_scrollSpeedChangeListenerVertical;
}; };
#endif // QT_AUTOCOMPLETION_LIST #endif // QT_AUTOCOMPLETION_LIST
+4 -3
View File
@@ -1,13 +1,13 @@
#include "qt/element/QtCodeArea.h" #include "qt/element/QtCodeArea.h"
#include <qapplication.h> #include <QApplication>
#include <QFont> #include <QFont>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <qmenu.h> #include <QMenu>
#include <QPainter> #include <QPainter>
#include <QPushButton> #include <QPushButton>
#include <QScrollBar>
#include <QToolTip> #include <QToolTip>
#include <qscrollbar.h>
#include "utility/messaging/type/MessageActivateLocalSymbols.h" #include "utility/messaging/type/MessageActivateLocalSymbols.h"
#include "utility/messaging/type/MessageActivateTokenLocations.h" #include "utility/messaging/type/MessageActivateTokenLocations.h"
@@ -130,6 +130,7 @@ QtCodeArea::QtCodeArea(
// MouseWheelOverScrollbarFilter is deleted by parent. // MouseWheelOverScrollbarFilter is deleted by parent.
horizontalScrollBar()->installEventFilter(new MouseWheelOverScrollbarFilter(this)); horizontalScrollBar()->installEventFilter(new MouseWheelOverScrollbarFilter(this));
m_scrollSpeedChangeListener.setScrollBar(horizontalScrollBar());
createActions(); createActions();
+3
View File
@@ -8,6 +8,7 @@
#include <QPlainTextEdit> #include <QPlainTextEdit>
#include "data/location/LocationType.h" #include "data/location/LocationType.h"
#include "qt/utility/QtScrollSpeedChangeListener.h"
#include "utility/types.h" #include "utility/types.h"
class QDragMoveEvent; class QDragMoveEvent;
@@ -190,6 +191,8 @@ private:
std::vector<int> m_lineLengths; std::vector<int> m_lineLengths;
int m_endTextEditPosition; int m_endTextEditPosition;
QtScrollSpeedChangeListener m_scrollSpeedChangeListener;
}; };
#endif // QT_CODE_AREA_H #endif // QT_CODE_AREA_H
@@ -80,6 +80,8 @@ QtCodeNavigator::QtCodeNavigator(QWidget* parent)
m_scrollArea->setWidgetResizable(true); m_scrollArea->setWidgetResizable(true);
m_scrollArea->setWidget(m_list); m_scrollArea->setWidget(m_list);
m_scrollSpeedChangeListener.setScrollBar(m_scrollArea->verticalScrollBar());
connect(m_scrollArea->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrolled(int))); connect(m_scrollArea->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrolled(int)));
connect(this, SIGNAL(shouldScrollToSnippet(QtCodeSnippet*, uint)), connect(this, SIGNAL(shouldScrollToSnippet(QtCodeSnippet*, uint)),
this, SLOT(scrollToSnippet(QtCodeSnippet*, uint)), Qt::QueuedConnection); this, SLOT(scrollToSnippet(QtCodeSnippet*, uint)), Qt::QueuedConnection);
+3
View File
@@ -5,6 +5,7 @@
#include <QScrollArea> #include <QScrollArea>
#include "qt/element/QtCodeFileList.h" #include "qt/element/QtCodeFileList.h"
#include "qt/utility/QtScrollSpeedChangeListener.h"
#include "qt/utility/QtThreadedFunctor.h" #include "qt/utility/QtThreadedFunctor.h"
#include "utility/messaging/MessageListener.h" #include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageCodeReference.h" #include "utility/messaging/type/MessageCodeReference.h"
@@ -125,6 +126,8 @@ private:
QtCodeFile* m_scrollToFile; QtCodeFile* m_scrollToFile;
uint m_scrollToLine; uint m_scrollToLine;
Id m_scrollToLocationId; Id m_scrollToLocationId;
QtScrollSpeedChangeListener m_scrollSpeedChangeListener;
}; };
#endif // QT_CODE_NAVIGATOR_H #endif // QT_CODE_NAVIGATOR_H
@@ -0,0 +1,35 @@
#include "qt/utility/QtScrollSpeedChangeListener.h"
#include <cmath>
#include <QScrollBar>
#include "settings/ApplicationSettings.h"
QtScrollSpeedChangeListener::QtScrollSpeedChangeListener()
: m_changeScrollSpeedFunctor(std::bind(&QtScrollSpeedChangeListener::doChangeScrollSpeed, this, std::placeholders::_1))
, m_scrollBar(nullptr)
, m_singleStep(1)
{
}
void QtScrollSpeedChangeListener::setScrollBar(QScrollBar* scrollbar)
{
m_scrollBar = scrollbar;
m_singleStep = scrollbar->singleStep();
doChangeScrollSpeed(ApplicationSettings::getInstance()->getScrollSpeed());
}
void QtScrollSpeedChangeListener::handleMessage(MessageScrollSpeedChange* message)
{
m_changeScrollSpeedFunctor(message->scrollSpeed);
}
void QtScrollSpeedChangeListener::doChangeScrollSpeed(float scrollSpeed)
{
if (m_scrollBar)
{
m_scrollBar->setSingleStep(std::ceil(m_singleStep * scrollSpeed));
}
}
@@ -0,0 +1,30 @@
#ifndef QT_SCROLL_SPEED_CHANGE_LISTENER
#define QT_SCROLL_SPEED_CHANGE_LISTENER
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageScrollSpeedChange.h"
#include "qt/utility/QtThreadedFunctor.h"
class QScrollBar;
class QtScrollSpeedChangeListener
: public MessageListener<MessageScrollSpeedChange>
{
public:
QtScrollSpeedChangeListener();
void setScrollBar(QScrollBar* scrollbar);
private:
void handleMessage(MessageScrollSpeedChange* message);
void doChangeScrollSpeed(float scrollSpeed);
QtThreadedFunctor<float> m_changeScrollSpeedFunctor;
QScrollBar* m_scrollBar;
int m_singleStep;
};
#endif // QT_SCROLL_SPEED_CHANGE_LISTENER
+10 -6
View File
@@ -13,12 +13,12 @@
#include "component/controller/helper/DummyNode.h" #include "component/controller/helper/DummyNode.h"
#include "component/controller/helper/GraphPostprocessor.h" #include "component/controller/helper/GraphPostprocessor.h"
#include "component/view/GraphViewStyle.h" #include "component/view/GraphViewStyle.h"
#include "settings/ColorScheme.h"
#include "utility/messaging/type/MessageDeactivateEdge.h" #include "utility/messaging/type/MessageDeactivateEdge.h"
#include "utility/ResourcePaths.h" #include "utility/ResourcePaths.h"
#include "qt/utility/utilityQt.h"
#include "qt/graphics/QtGraphicsView.h" #include "qt/graphics/QtGraphicsView.h"
#include "qt/utility/utilityQt.h"
#include "qt/view/QtViewWidgetWrapper.h" #include "qt/view/QtViewWidgetWrapper.h"
#include "qt/view/graphElements/nodeComponents/QtGraphNodeComponentClickable.h" #include "qt/view/graphElements/nodeComponents/QtGraphNodeComponentClickable.h"
#include "qt/view/graphElements/nodeComponents/QtGraphNodeComponentMoveable.h" #include "qt/view/graphElements/nodeComponents/QtGraphNodeComponentMoveable.h"
@@ -27,7 +27,6 @@
#include "qt/view/graphElements/QtGraphNodeBundle.h" #include "qt/view/graphElements/QtGraphNodeBundle.h"
#include "qt/view/graphElements/QtGraphNodeData.h" #include "qt/view/graphElements/QtGraphNodeData.h"
#include "qt/view/graphElements/QtGraphNodeExpandToggle.h" #include "qt/view/graphElements/QtGraphNodeExpandToggle.h"
#include "settings/ColorScheme.h"
QtGraphView::QtGraphView(ViewLayout* viewLayout) QtGraphView::QtGraphView(ViewLayout* viewLayout)
: GraphView(viewLayout) : GraphView(viewLayout)
@@ -72,6 +71,9 @@ void QtGraphView::initView()
connect(view, SIGNAL(emptySpaceClicked()), this, SLOT(clickedInEmptySpace())); connect(view, SIGNAL(emptySpaceClicked()), this, SLOT(clickedInEmptySpace()));
m_scrollSpeedChangeListenerHorizontal.setScrollBar(view->horizontalScrollBar());
m_scrollSpeedChangeListenerVertical.setScrollBar(view->verticalScrollBar());
doRefreshView(); doRefreshView();
} }
@@ -305,10 +307,12 @@ void QtGraphView::doRefreshView()
doClear(); doClear();
doResize(); doResize();
std::string css = utility::getStyleSheet(ResourcePaths::getGuiPath() + "graph_view/graph_view.css"); QtGraphicsView* view = getView();
getView()->setStyleSheet(css.c_str());
getView()->setAppZoomFactor(GraphViewStyle::getZoomFactor()); std::string css = utility::getStyleSheet(ResourcePaths::getGuiPath() + "graph_view/graph_view.css");
view->setStyleSheet(css.c_str());
view->setAppZoomFactor(GraphViewStyle::getZoomFactor());
} }
std::shared_ptr<QtGraphNode> QtGraphView::findNodeRecursive(const std::list<std::shared_ptr<QtGraphNode>>& nodes, Id tokenId) std::shared_ptr<QtGraphNode> QtGraphView::findNodeRecursive(const std::list<std::shared_ptr<QtGraphNode>>& nodes, Id tokenId)
+4
View File
@@ -5,6 +5,7 @@
#include <QPointF> #include <QPointF>
#include "component/view/GraphView.h" #include "component/view/GraphView.h"
#include "qt/utility/QtScrollSpeedChangeListener.h"
#include "qt/utility/QtThreadedFunctor.h" #include "qt/utility/QtThreadedFunctor.h"
#include "utility/types.h" #include "utility/types.h"
@@ -110,6 +111,9 @@ private:
std::shared_ptr<QSequentialAnimationGroup> m_transition; std::shared_ptr<QSequentialAnimationGroup> m_transition;
QPointF m_sceneRectOffset; QPointF m_sceneRectOffset;
QtScrollSpeedChangeListener m_scrollSpeedChangeListenerHorizontal;
QtScrollSpeedChangeListener m_scrollSpeedChangeListenerVertical;
}; };
#endif // QT_GRAPH_VIEW_H #endif // QT_GRAPH_VIEW_H
+1 -1
View File
@@ -10,6 +10,7 @@
#include <QSysInfo> #include <QSysInfo>
#include <QTimer> #include <QTimer>
#include "Application.h"
#include "component/view/View.h" #include "component/view/View.h"
#include "component/view/CompositeView.h" #include "component/view/CompositeView.h"
#include "qt/utility/QtContextMenu.h" #include "qt/utility/QtContextMenu.h"
@@ -21,7 +22,6 @@
#include "qt/window/QtAbout.h" #include "qt/window/QtAbout.h"
#include "qt/window/QtLicense.h" #include "qt/window/QtLicense.h"
#include "settings/ApplicationSettings.h" #include "settings/ApplicationSettings.h"
#include "Application.h"
#include "utility/file/FileSystem.h" #include "utility/file/FileSystem.h"
#include "utility/logging/logging.h" #include "utility/logging/logging.h"
#include "utility/messaging/type/MessageCodeReference.h" #include "utility/messaging/type/MessageCodeReference.h"
@@ -23,6 +23,7 @@
#include "utility/messaging/type/MessageDispatchWhenLicenseValid.h" #include "utility/messaging/type/MessageDispatchWhenLicenseValid.h"
#include "utility/messaging/type/MessageLoadProject.h" #include "utility/messaging/type/MessageLoadProject.h"
#include "utility/messaging/type/MessageRefresh.h" #include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageScrollSpeedChange.h"
#include "utility/messaging/type/MessageStatus.h" #include "utility/messaging/type/MessageStatus.h"
#include "utility/solution/SolutionParserVisualStudio.h" #include "utility/solution/SolutionParserVisualStudio.h"
#include "utility/utilityString.h" #include "utility/utilityString.h"
@@ -37,9 +38,11 @@ QtProjectWizzard::QtProjectWizzard(QWidget* parent)
connect(&m_windowStack, SIGNAL(push()), this, SLOT(windowStackChanged())); connect(&m_windowStack, SIGNAL(push()), this, SLOT(windowStackChanged()));
connect(&m_windowStack, SIGNAL(pop()), this, SLOT(windowStackChanged())); connect(&m_windowStack, SIGNAL(pop()), this, SLOT(windowStackChanged()));
// save old application settings so they can be compared later
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get(); ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
m_appSettings.setHeaderSearchPaths(appSettings->getHeaderSearchPaths()); m_appSettings.setHeaderSearchPaths(appSettings->getHeaderSearchPaths());
m_appSettings.setFrameworkSearchPaths(appSettings->getFrameworkSearchPaths()); m_appSettings.setFrameworkSearchPaths(appSettings->getFrameworkSearchPaths());
m_appSettings.setScrollSpeed(appSettings->getScrollSpeed());
m_parserManager = std::make_shared<SolutionParserManager>(); m_parserManager = std::make_shared<SolutionParserManager>();
@@ -699,6 +702,11 @@ void QtProjectWizzard::savePreferences()
{ {
bool appSettingsChanged = !(m_appSettings == *ApplicationSettings::getInstance().get()); bool appSettingsChanged = !(m_appSettings == *ApplicationSettings::getInstance().get());
if (m_appSettings.getScrollSpeed() != ApplicationSettings::getInstance()->getScrollSpeed())
{
MessageScrollSpeedChange(ApplicationSettings::getInstance()->getScrollSpeed()).dispatch();
}
if (appSettingsChanged) if (appSettingsChanged)
{ {
Project* currentProject = Application::getInstance()->getCurrentProject().get(); Project* currentProject = Application::getInstance()->getCurrentProject().get();
@@ -84,8 +84,21 @@ void QtProjectWizzardContentPreferences::populateForm(QGridLayout* layout, int&
layout->addWidget(m_colorSchemes, row, QtProjectWizzardWindow::BACK_COL, Qt::AlignLeft); layout->addWidget(m_colorSchemes, row, QtProjectWizzardWindow::BACK_COL, Qt::AlignLeft);
row++; row++;
layout->setRowMinimumHeight(row++, 20); // scroll speed
m_scrollSpeed = new QLineEdit();
m_scrollSpeed->setObjectName("name");
m_scrollSpeed->setAttribute(Qt::WA_MacShowFocusRect, 0);
layout->addWidget(createFormLabel("Scroll Speed"), row, QtProjectWizzardWindow::FRONT_COL, Qt::AlignRight);
layout->addWidget(m_scrollSpeed, row, QtProjectWizzardWindow::BACK_COL);
addHelpButton(
"Multiplier for scroll speed. Set to a value between 0 and 1 to scroll slower, or set to larger than 1 to scroll faster."
, layout, row
);
row++;
layout->setRowMinimumHeight(row++, 20);
// indexing // indexing
layout->addWidget(createFormTitle("INDEXING"), row, QtProjectWizzardWindow::FRONT_COL, Qt::AlignLeft); layout->addWidget(createFormTitle("INDEXING"), row, QtProjectWizzardWindow::FRONT_COL, Qt::AlignLeft);
@@ -142,6 +155,8 @@ void QtProjectWizzardContentPreferences::load()
} }
} }
m_scrollSpeed->setText(QString::number(appSettings->getScrollSpeed(), 'f', 1));
m_threads->setCurrentIndex(appSettings->getIndexerThreadCount() - 1); m_threads->setCurrentIndex(appSettings->getIndexerThreadCount() - 1);
m_fatalErrors->setChecked(appSettings->getShowExternalNonFatalErrors()); m_fatalErrors->setChecked(appSettings->getShowExternalNonFatalErrors());
} }
@@ -158,6 +173,12 @@ void QtProjectWizzardContentPreferences::save()
appSettings->setColorSchemePath(m_colorSchemePaths[m_colorSchemes->currentIndex()]); appSettings->setColorSchemePath(m_colorSchemePaths[m_colorSchemes->currentIndex()]);
m_oldColorSchemeIndex = -1; m_oldColorSchemeIndex = -1;
float scrollSpeed = m_scrollSpeed->text().toFloat();
if (scrollSpeed)
{
appSettings->setScrollSpeed(scrollSpeed);
}
appSettings->setIndexerThreadCount(m_threads->currentIndex() + 1); appSettings->setIndexerThreadCount(m_threads->currentIndex() + 1);
appSettings->setShowExternalNonFatalErrors(m_fatalErrors->isChecked()); appSettings->setShowExternalNonFatalErrors(m_fatalErrors->isChecked());
} }
@@ -32,6 +32,7 @@ private:
QComboBox* m_fontSize; QComboBox* m_fontSize;
QComboBox* m_tabWidth; QComboBox* m_tabWidth;
QComboBox* m_colorSchemes; QComboBox* m_colorSchemes;
QLineEdit* m_scrollSpeed;
QComboBox* m_threads; QComboBox* m_threads;
QCheckBox* m_fatalErrors; QCheckBox* m_fatalErrors;