2013-08-09 15:04:52 +02:00
|
|
|
/*
|
|
|
|
* \brief Launcher entry widget implementation
|
|
|
|
* \author Christian Prochaska
|
|
|
|
* \date 2008-04-06
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "launch_entry.h"
|
|
|
|
|
|
|
|
Launch_entry::Launch_entry(const char *filename, unsigned long default_quota,
|
2014-08-06 17:44:24 +02:00
|
|
|
unsigned long max_quota,
|
|
|
|
Genode::Dataspace_capability config_ds,
|
|
|
|
Launchpad *launchpad,
|
2013-08-09 15:04:52 +02:00
|
|
|
QWidget *parent)
|
2014-08-06 17:44:24 +02:00
|
|
|
: QWidget(parent),
|
|
|
|
_filename(filename),
|
|
|
|
_config_ds(config_ds),
|
|
|
|
_launchpad(launchpad)
|
2013-08-09 15:04:52 +02:00
|
|
|
{
|
|
|
|
ui.setupUi(this);
|
2014-08-06 17:44:24 +02:00
|
|
|
|
2013-08-09 15:04:52 +02:00
|
|
|
ui.launchButton->setText(filename);
|
2014-08-06 17:44:24 +02:00
|
|
|
|
2013-08-09 15:04:52 +02:00
|
|
|
ui.quotaDial->setMaximum(max_quota);
|
|
|
|
ui.quotaDial->setSingleStep(max_quota / 100);
|
|
|
|
ui.quotaDial->setValue(default_quota);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Launch_entry::on_launchButton_clicked()
|
|
|
|
{
|
2014-08-06 17:44:24 +02:00
|
|
|
_launchpad->start_child(_filename,
|
|
|
|
1024 * ui.quotaDial->value(),
|
|
|
|
_config_ds);
|
2013-08-09 15:04:52 +02:00
|
|
|
}
|