mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-08 08:25:18 +00:00
added settings action registration functions to qprojectm
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@741 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -211,7 +211,7 @@ void QPlaylistModel::clearItems()
|
||||
{
|
||||
beginRemoveRows ( QModelIndex(), 0, rowCount()-1 );
|
||||
m_projectM.clearPlaylist();
|
||||
m_ratings.clear();
|
||||
m_ratings.clear();
|
||||
endRemoveRows();
|
||||
}
|
||||
|
||||
|
||||
@ -53,8 +53,8 @@
|
||||
<widget class="QLineEdit" name="fontPathLineEdit" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>78</x>
|
||||
<y>49</y>
|
||||
<x>80</x>
|
||||
<y>50</y>
|
||||
<width>320</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
@ -200,16 +200,16 @@ p, li { white-space: pre-wrap; }
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Initial Window Size</string>
|
||||
<string>Window Size</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_6" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>195</x>
|
||||
<y>117</y>
|
||||
<width>91</width>
|
||||
<height>25</height>
|
||||
<x>280</x>
|
||||
<y>120</y>
|
||||
<width>101</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
@ -225,9 +225,9 @@ p, li { white-space: pre-wrap; }
|
||||
<widget class="QSpinBox" name="maxFPSSpinBox" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>292</x>
|
||||
<x>380</x>
|
||||
<y>117</y>
|
||||
<width>142</width>
|
||||
<width>54</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -244,11 +244,11 @@ p, li { white-space: pre-wrap; }
|
||||
<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></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox" name="initialWindowSizeSpinBox" >
|
||||
<widget class="QSpinBox" name="windowHeightSpinBox" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>134</x>
|
||||
<y>117</y>
|
||||
<x>110</x>
|
||||
<y>120</y>
|
||||
<width>54</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
@ -447,6 +447,41 @@ p, li { white-space: pre-wrap; }
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox" name="windowWidthSpinBox" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>120</y>
|
||||
<width>54</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string><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></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_11" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>170</x>
|
||||
<y>120</y>
|
||||
<width>16</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>by</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@ -512,10 +512,21 @@ void QProjectM_MainWindow::createActions()
|
||||
connect ( ui->actionSave_play_list, SIGNAL ( triggered() ), this, SLOT ( savePlaylist() ) );
|
||||
connect ( ui->actionAbout_qprojectM, SIGNAL ( triggered() ), this, SLOT ( about() ) );
|
||||
connect ( ui->actionConfigure_projectM, SIGNAL ( triggered() ), this, SLOT (openSettingsDialog()) );
|
||||
|
||||
/// @bug pull the aboutQt() code from repo to put it back.
|
||||
//connect(ui->actionAbout_Qt, SIGNAL(triggered()), this, SLOT(aboutQt()));
|
||||
|
||||
}
|
||||
|
||||
void QProjectM_MainWindow::registerSettingsAction(QAction * action) {
|
||||
ui->menuSettings->addAction(action);
|
||||
}
|
||||
|
||||
|
||||
void QProjectM_MainWindow::unregisterSettingsAction(QAction * action) {
|
||||
ui->menuSettings->removeAction(action);
|
||||
}
|
||||
|
||||
void QProjectM_MainWindow::createMenus()
|
||||
{
|
||||
ui->menuBar->hide();
|
||||
|
||||
@ -45,8 +45,8 @@ class QModelIndex;
|
||||
namespace Ui {
|
||||
class QProjectM_MainWindow;
|
||||
class QProjectMConfigDialog;
|
||||
|
||||
}
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@ -55,13 +55,12 @@ class QProjectM : public QObject, public projectM {
|
||||
|
||||
public:
|
||||
QProjectM(const std::string & config_file):projectM(config_file) {}
|
||||
|
||||
|
||||
|
||||
void presetSwitchedEvent(bool hardCut, unsigned int index) const {
|
||||
presetSwitchedSignal(hardCut, index);
|
||||
}
|
||||
signals:
|
||||
void presetSwitchedSignal(bool hardCut, unsigned int index) const;
|
||||
void presetSwitchedSignal(bool hardCut, unsigned int index) const;
|
||||
public slots:
|
||||
|
||||
};
|
||||
@ -221,17 +220,24 @@ public:
|
||||
QString name;
|
||||
int rating;
|
||||
} PlaylistItemMetaData;
|
||||
|
||||
typedef QVector<PlaylistItemMetaData> PlaylistItemVector;
|
||||
|
||||
QProjectM_MainWindow(const std::string & config_file);
|
||||
~QProjectM_MainWindow();
|
||||
virtual ~QProjectM_MainWindow();
|
||||
void registerSettingsAction(QAction * action);
|
||||
void unregisterSettingsAction(QAction * action);
|
||||
|
||||
void keyReleaseEvent ( QKeyEvent * e );
|
||||
QProjectM * getQProjectM();
|
||||
|
||||
void refreshPlaylist();
|
||||
void refreshPlaylist();
|
||||
|
||||
QProjectMWidget * getQProjectMWidget() { return m_QProjectMWidget; }
|
||||
|
||||
|
||||
void registerAction(const QAction &);
|
||||
|
||||
QProjectMWidget * getQProjectMWidget() { return m_QProjectMWidget; }
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user