mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-05 23:09:04 +00:00
Changed: Play button
This commit is contained in:
parent
1743cb1759
commit
6370c08da5
2 changed files with 32 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "profilesdialog.h"
|
||||
#include "configfile.h"
|
||||
#include "config.h"
|
||||
#include "profilesmodel.h"
|
||||
|
||||
#include "seven_zip.h"
|
||||
|
||||
|
@ -70,6 +71,9 @@ CMainWindow::CMainWindow():QMainWindow(), m_archive(NULL), m_statusLabel(NULL)
|
|||
|
||||
connect(actionProfiles, SIGNAL(triggered()), SLOT(onProfiles()));
|
||||
|
||||
connect(playButton, SIGNAL(clicked()), SLOT(onPlayClicked()));
|
||||
connect(configureButton, SIGNAL(clicked()), SLOT(onConfigureClicked()));
|
||||
|
||||
connect(actionAboutQt, SIGNAL(triggered()), SLOT(onAboutQt()));
|
||||
connect(actionAbout, SIGNAL(triggered()), SLOT(onAbout()));
|
||||
|
||||
|
@ -170,6 +174,8 @@ void CMainWindow::displayConfigurationsChoices()
|
|||
{
|
||||
downloadFrame->setVisible(false);
|
||||
configurationFrame->setVisible(true);
|
||||
|
||||
profilesComboBox->setModel(new CProfilesModel(this));
|
||||
}
|
||||
|
||||
void CMainWindow::showEvent(QShowEvent *e)
|
||||
|
@ -214,6 +220,28 @@ void CMainWindow::onStopClicked()
|
|||
}
|
||||
}
|
||||
|
||||
void CMainWindow::onPlayClicked()
|
||||
{
|
||||
int profileIndex = profilesComboBox->currentIndex();
|
||||
|
||||
if (profileIndex < 0) return;
|
||||
|
||||
CProfile profile = CConfigFile::getInstance()->getProfile(profileIndex);
|
||||
|
||||
if (profile.executable.isEmpty()) return;
|
||||
|
||||
QStringList arguments;
|
||||
arguments << "-p";
|
||||
arguments << QString::number(profileIndex);
|
||||
arguments << profile.arguments;
|
||||
|
||||
bool started = QProcess::startDetached(profile.executable, arguments);
|
||||
}
|
||||
|
||||
void CMainWindow::onConfigureClicked()
|
||||
{
|
||||
}
|
||||
|
||||
void CMainWindow::onProfiles()
|
||||
{
|
||||
CProfilesDialog dialog;
|
||||
|
@ -391,6 +419,7 @@ void CMainWindow::onExtractSuccess(qint64 total)
|
|||
|
||||
resumeButton->setVisible(false);
|
||||
stopButton->setVisible(false);
|
||||
}
|
||||
|
||||
processNextStep();
|
||||
}
|
||||
|
|
|
@ -41,6 +41,9 @@ public slots:
|
|||
void onResumeClicked();
|
||||
void onStopClicked();
|
||||
|
||||
void onPlayClicked();
|
||||
void onConfigureClicked();
|
||||
|
||||
void onProfiles();
|
||||
void onAbout();
|
||||
void onAboutQt();
|
||||
|
|
Loading…
Reference in a new issue