コード例 #1
0
ファイル: qt_launchpad.cpp プロジェクト: kloisiie/vsos
void Qt_launchpad::add_launcher(const char *filename, QString progtitle,
                                unsigned long default_quota,Genode::Dataspace_capability config_ds, int groupNum)
{
	Launch_entry *launch_entry = new Launch_entry(filename, progtitle, default_quota / 1024,
                                              	initial_quota() / 1024, this,config_ds);
	launch_entry->setObjectName(QString(filename) + "_launch_entry");
	//launcherDockWidgetContents->layout()->addWidget(launch_entry);
	//launcherDockWidgetContents->layout()->setAlignment(Qt::AlignTop);
	if(groupNum==0&&strcmp(filename,"liquid_fb")!=0) {
		layoutMain->addWidget(launch_entry);
	}
	else if(strcmp(filename,"liquid_fb")==0) {
		launch_entry->ui.launchButton->setIconSize(QSize(0,0));
		launch_entry->ui.launchButton->setMinimumSize(QSize(0,0));
		launch_entry->ui.launchButton->setMaximumSize(QSize(0,0));
		layoutMain->addWidget(launch_entry);
	}
	else if(strcmp(filename,"funtest")==0) {
		layoutTest->addWidget(launch_entry);
	}
	else if(groupNum==1) {
		launch_entry->ui.launchButton->setIconSize(QSize(0,0));
		launch_entry->ui.launchButton->setMinimumSize(QSize(100,20));
		layoutTest->addWidget(launch_entry);
	}
	else if(groupNum==2) {
		layout3->addWidget(launch_entry);
	}
	launch_entry->show();
	launcherDockWidgetContents->adjustSize();
}
コード例 #2
0
void Qt_launchpad::add_child(Launchpad_child::Name const &name,
                             unsigned long quota,
                             Launchpad_child &launchpad_child,
                             Genode::Allocator &alloc)
{
	Child_entry *child_entry = new Child_entry(name, quota / 1024,
                                             initial_quota() / 1024,
                                             *this, launchpad_child);
	child_entry->setObjectName(QString(name.string()) + "_child_entry");
	childrenDockWidgetContents->layout()->addWidget(child_entry);
	child_entry->show();
	childrenDockWidgetContents->adjustSize();
}
コード例 #3
0
void Qt_launchpad::add_launcher(Launchpad_child::Name const &binary_name,
                                unsigned long default_quota,
                                Genode::Dataspace_capability config_ds)
{
	Launch_entry *launch_entry = new Launch_entry(binary_name,
	                                              default_quota / 1024,
                                              	  initial_quota() / 1024,
                                              	  this,
                                              	  config_ds);
	launcherDockWidgetContents->layout()->addWidget(launch_entry);
	launch_entry->show();
	launcherDockWidgetContents->adjustSize();
}
コード例 #4
0
ファイル: qt_launchpad.cpp プロジェクト: GeJanani/filesystem
void Qt_launchpad::add_child(const char *unique_name,
                             unsigned long quota,
                             Launchpad_child *launchpad_child,
                             Genode::Allocator *alloc)
{
	Child_entry *child_entry = new Child_entry(unique_name, quota / 1024,
                                             initial_quota() / 1024,
                                             this, launchpad_child);
	child_entry->setObjectName(QString(unique_name) + "_child_entry");
	childrenDockWidgetContents->layout()->addWidget(child_entry);
	child_entry->show();
	childrenDockWidgetContents->adjustSize();
}
コード例 #5
0
ファイル: qt_launchpad.cpp プロジェクト: kloisiie/vsos
void Qt_launchpad::add_child(const char *unique_name,
                             unsigned long quota,
                             Launchpad_child *launchpad_child,
                             Genode::Allocator *alloc)
{
	Child_entry *child_entry = new Child_entry(unique_name, quota / 1024,
                                             initial_quota() / 1024,
                                             this, launchpad_child);
	Launch_entry *launch_entry=launcherDockWidgetContents->findChild<Launch_entry*>(QString(unique_name)+"_launch_entry");
	//PERR("connect unique name %s",unique_name);
	if(child_entry&&launch_entry){
		//PERR("connect");
		QObject::connect(child_entry,SIGNAL(rebutton(bool)),launch_entry,SLOT(restore_button(bool)),Qt::DirectConnection);
	}
	child_entry->setObjectName(QString(unique_name) + "_child_entry");
	childrenDockWidgetContents->layout()->addWidget(child_entry);
	child_entry->show();
	childrenDockWidgetContents->adjustSize();
	child_entry->say_hello(false);
}
コード例 #6
0
ファイル: qt_launchpad.cpp プロジェクト: kloisiie/vsos
void Qt_launchpad::quota(unsigned long quota)
{
	totalQuotaProgressBar->setMaximum(initial_quota() / (1024*1024));
	totalQuotaProgressBar->setValue(quota / (1024*1024));
}