diff --git a/src/projectM-qt/qprojectmconfigdialog.cpp b/src/projectM-qt/qprojectmconfigdialog.cpp index f3d3aa7c7..2c3fded4d 100644 --- a/src/projectM-qt/qprojectmconfigdialog.cpp +++ b/src/projectM-qt/qprojectmconfigdialog.cpp @@ -150,6 +150,7 @@ void QProjectMConfigDialog::saveConfig() { qSettings.setValue("PlaylistFile", _ui.startupPlaylistFileLineEdit->text()); + qSettings.setValue("MouseHideOnTimeout", _ui.mouseHideTimeoutSpinBox->value()); } @@ -192,5 +193,6 @@ void QProjectMConfigDialog::loadConfig() { _ui.fullscreenOnStartupCheckBox->setCheckState(qSettings.value("FullscreenOnStartup", false).toBool() ? Qt::Checked : Qt::Unchecked); _ui.menuOnStartupCheckBox->setCheckState(qSettings.value("MenuOnStartup", false).toBool() ? Qt::Checked : Qt::Unchecked); _ui.startupPlaylistFileLineEdit->setText(qSettings.value("PlaylistFile", QString()).toString() ); + _ui.mouseHideTimeoutSpinBox->setValue(qSettings.value("MouseHideOnTimeout", 5).toInt()); } diff --git a/src/projectM-qt/qprojectmconfigdialog.ui b/src/projectM-qt/qprojectmconfigdialog.ui index 26de60357..d8cb067d2 100644 --- a/src/projectM-qt/qprojectmconfigdialog.ui +++ b/src/projectM-qt/qprojectmconfigdialog.ui @@ -1,563 +1,593 @@ - + + QProjectMConfigDialog - - + + 0 0 - 503 - 360 + 676 + 372 - + projectM Settings - - + + 8 8 - 492 - 344 + 662 + 364 - - - - - + + + + + 0 0 - + 50 0 - + Playlist Directory - - - - + + + + 2 0 - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This sets the default preset playlist directory when projectM starts up. Every valid preset file in the specified directory will be loaded into the playlist upon initialization. <span style=" font-weight:600;">NOTE:</span> This option is overriden by a non empty value of the <span style=" font-style:italic;">Playlist File </span>option.</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This sets the default preset playlist directory when projectM starts up. Every valid preset file in the specified directory will be loaded into the playlist upon initialization. <span style=" font-weight:600;">NOTE:</span> This option is overriden by a non empty value of the <span style=" font-style:italic;">Playlist File </span>option.</p></body></html> - - - + + + ... - - - - + + + + 0 0 - + 50 0 - + Playlist File - - - - + + + + 2 0 - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This sets the default preset playlist file when projectM starts up. The file must be a valid preset playlist (of type *.ppl). If specified, this overrides the <span style=" font-style:italic;">Playlist Directory</span> value on startup. </p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This sets the default preset playlist file when projectM starts up. The file must be a valid preset playlist (of type *.ppl). If specified, this overrides the <span style=" font-style:italic;">Playlist Directory</span> value on startup. </p></body></html> - - - + + + ... - - - - + + + + 0 0 - + 50 0 - + Menu Font Path - - - - + + + + 2 0 - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This changes the font projectM will use for its opengl rendered menus</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This changes the font projectM will use for its opengl rendered menus</p></body></html> - - - + + + ... - - - - + + + + 0 0 - + 50 0 - + Title Font Path - - - - + + + + 2 0 - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changes the font projectM will use for rendering the song title</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Changes the font projectM will use for rendering the song title</p></body></html> - - - + + + ... - - - + + + Preset Duration (s) - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sets how long a preset should be played in seconds before projectM automatically switches to another in the playlist</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sets how long a preset should be played in seconds before projectM automatically switches to another in the playlist</p></body></html> - + 1 - + 100000 - - - + + + Smooth Preset Duration (s) - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sets how long a transition occurs in seconds when smooth preset switching</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sets how long a transition occurs in seconds when smooth preset switching</p></body></html> - + 1 - + 1000000 - - - - + + + + 0 0 - + Beat Sensitivity - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sets the intensity threshold for the preset hard cuts</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sets the intensity threshold for the preset hard cuts</p></body></html> - + 0.000000000000000 - + 100.000000000000000 - - - - + + + + 0 0 - + Maximum FPS - - - - + + + + 2 0 - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This parameter, if nonzero, limits the number of frames per second projectM will attempt to render to screen. 35 is a reasonable limit.</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This parameter, if nonzero, limits the number of frames per second projectM will attempt to render to screen. 35 is a reasonable limit.</p></body></html> - + 0 - - - - + + + + 0 0 - + Texture Size - - - - + + + + 1 0 - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sets the size of the texture. Higher is better, but slower.</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sets the size of the texture. Higher is better, but slower.</p></body></html> - + QComboBox::AdjustToMinimumContentsLength - - - - + + + + 0 0 - + Easter Egg Parameter - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A mystery parameter!</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A mystery parameter!</p></body></html> - + 20.000000000000000 - + 0.010000000000000 - - + + - - - + + + 0 0 - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This makes a square look like a square, and a circle look like a circle in cases where they may not otherwise.</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This makes a square look like a square, and a circle look like a circle in cases where they may not otherwise.</p></body></html> - + Use Aspect Correction - - - + + + 0 0 - + Show Menu on startup - - - + + + 0 0 - + Fullscreen on startup - - - + + + 0 0 - + Shuffle on startup - - - - + + + + 0 0 - + Mesh Size - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This modifies the horizontal component of the mesh. Higher is better but slower</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This modifies the horizontal component of the mesh. Higher is better but slower</p></body></html> - + 1 - + 1000 - + 1 - - - - + + + + 0 0 - + by - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This modifies the vertical component of the mesh. Higher is better but slower</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This modifies the vertical component of the mesh. Higher is better but slower</p></body></html> - + 1 - + 1000 - - - - + + + + 0 0 - + Window Size - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This modifies the horizontal component of the startup window size </p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This modifies the horizontal component of the startup window size </p></body></html> - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This modifies the horizontal component of the startup window size </p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This modifies the horizontal component of the startup window size </p></body></html> - + 1 - + 10000 - - - - + + + + 0 0 - + by - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This modifies the vertical component of the startup window size</p></body></html> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:9pt;">This modifies the vertical component of the startup window size</p></body></html> - + 1 - + 10000 - - - + + + Click save to write the settings to your projectM config file. The reset button will bring your settings back to whatever was stored on disk. - + Qt::RightToLeft - + Qt::Horizontal - - QDialogButtonBox::Close|QDialogButtonBox::NoButton|QDialogButtonBox::Reset|QDialogButtonBox::Save + + QDialogButtonBox::Close|QDialogButtonBox::Reset|QDialogButtonBox::Save + + + + + + + Sets how long of an idle interval to wait before hiding the mouse. A value of zero disables this feature. + + + Mouse Hide Timeout (s) + + + + + + + <html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sets how long a preset should be played in seconds before projectM automatically switches to another in the playlist</p></body></html> + + + + + + 0 + + + 30000 diff --git a/src/projectM-qt/qprojectmwidget.hpp b/src/projectM-qt/qprojectmwidget.hpp index c0de0b3c8..586c5e884 100644 --- a/src/projectM-qt/qprojectmwidget.hpp +++ b/src/projectM-qt/qprojectmwidget.hpp @@ -29,6 +29,7 @@ #include #include #include +#include class QProjectMWidget : public QGLWidget { @@ -42,7 +43,13 @@ class QProjectMWidget : public QGLWidget { m_mouseTimer = new QTimer ( this ); - m_mouseTimer->start ( MOUSE_VISIBLE_TIMEOUT_MS ); + + QSettings settings("projectM", "qprojectM"); + mouseHideTimeoutSeconds = + settings.value("MouseHideOnTimeout", MOUSE_VISIBLE_TIMEOUT_MS/1000).toInt(); + + if (mouseHideTimeoutSeconds > 0) + m_mouseTimer->start ( mouseHideTimeoutSeconds * 1000); connect ( m_mouseTimer, SIGNAL ( timeout() ), this, SLOT ( hideMouse() ) ); this->setMouseTracking ( true ); @@ -89,7 +96,8 @@ class QProjectMWidget : public QGLWidget m_mouseTimer->stop(); QApplication::restoreOverrideCursor(); - m_mouseTimer->start ( MOUSE_VISIBLE_TIMEOUT_MS ); + if (mouseHideTimeoutSeconds > 0) + m_mouseTimer->start ( mouseHideTimeoutSeconds*1000 ); } @@ -248,7 +256,7 @@ class QProjectMWidget : public QGLWidget } private: - + int mouseHideTimeoutSeconds; void setup_opengl ( int w, int h ) {