mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Changed: Play button
--HG-- branch : feature-ryzom-installer
This commit is contained in:
parent
3397d1dc38
commit
5deb7327e3
2 changed files with 32 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
||||||
#include "profilesdialog.h"
|
#include "profilesdialog.h"
|
||||||
#include "configfile.h"
|
#include "configfile.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "profilesmodel.h"
|
||||||
|
|
||||||
#include "seven_zip.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(actionProfiles, SIGNAL(triggered()), SLOT(onProfiles()));
|
||||||
|
|
||||||
|
connect(playButton, SIGNAL(clicked()), SLOT(onPlayClicked()));
|
||||||
|
connect(configureButton, SIGNAL(clicked()), SLOT(onConfigureClicked()));
|
||||||
|
|
||||||
connect(actionAboutQt, SIGNAL(triggered()), SLOT(onAboutQt()));
|
connect(actionAboutQt, SIGNAL(triggered()), SLOT(onAboutQt()));
|
||||||
connect(actionAbout, SIGNAL(triggered()), SLOT(onAbout()));
|
connect(actionAbout, SIGNAL(triggered()), SLOT(onAbout()));
|
||||||
|
|
||||||
|
@ -170,6 +174,8 @@ void CMainWindow::displayConfigurationsChoices()
|
||||||
{
|
{
|
||||||
downloadFrame->setVisible(false);
|
downloadFrame->setVisible(false);
|
||||||
configurationFrame->setVisible(true);
|
configurationFrame->setVisible(true);
|
||||||
|
|
||||||
|
profilesComboBox->setModel(new CProfilesModel(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainWindow::showEvent(QShowEvent *e)
|
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()
|
void CMainWindow::onProfiles()
|
||||||
{
|
{
|
||||||
CProfilesDialog dialog;
|
CProfilesDialog dialog;
|
||||||
|
@ -391,6 +419,7 @@ void CMainWindow::onExtractSuccess(qint64 total)
|
||||||
|
|
||||||
resumeButton->setVisible(false);
|
resumeButton->setVisible(false);
|
||||||
stopButton->setVisible(false);
|
stopButton->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
processNextStep();
|
processNextStep();
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,9 @@ public slots:
|
||||||
void onResumeClicked();
|
void onResumeClicked();
|
||||||
void onStopClicked();
|
void onStopClicked();
|
||||||
|
|
||||||
|
void onPlayClicked();
|
||||||
|
void onConfigureClicked();
|
||||||
|
|
||||||
void onProfiles();
|
void onProfiles();
|
||||||
void onAbout();
|
void onAbout();
|
||||||
void onAboutQt();
|
void onAboutQt();
|
||||||
|
|
Loading…
Reference in a new issue