예제 #1
0
	void Plugin::Init (ICoreProxy_ptr proxy)
	{
		Util::InstallTranslator ("launchy");

		Proxy_ = proxy;

		Finder_ = new ItemsFinder (proxy);

		FavManager_ = new FavoritesManager;

		ShortcutMgr_ = new Util::ShortcutManager (proxy, this);
		ShortcutMgr_->SetObject (this);

		FSLauncher_ = new QAction (tr ("Open fullscreen launcher..."), this);
		FSLauncher_->setProperty ("ActionIcon", "system-run");
		FSLauncher_->setShortcut (QString ("Meta+R"));
		connect (FSLauncher_,
				SIGNAL (triggered ()),
				this,
				SLOT (handleFSRequested ()));

		ShortcutMgr_->RegisterAction ("FSLauncher", FSLauncher_, true);

		auto itemImageProv = new ItemImageProvider;
		auto quarkMgr = new QuarkManager (proxy, FavManager_, Finder_, itemImageProv);

		LaunchQuark_.reset (new QuarkComponent ("launchy", "LaunchyQuark.qml"));
		LaunchQuark_->DynamicProps_.push_back ({ "Launchy_itemModel", quarkMgr->GetModel () });
		LaunchQuark_->DynamicProps_.push_back ({ "Launchy_proxy", quarkMgr });
		LaunchQuark_->ImageProviders_.push_back ({ "LaunchyItemIcons", itemImageProv });
	}
예제 #2
0
	void Plugin::Init (ICoreProxy_ptr proxy)
	{
		Proxy_ = proxy;

		Finder_ = new ItemsFinder (proxy);

		FSLauncher_ = new QAction (tr ("Open fullscreen launcher..."), this);
		FSLauncher_->setProperty ("ActionIcon", "system-run");
		connect (FSLauncher_,
				SIGNAL (triggered ()),
				this,
				SLOT (handleFSRequested ()));
	}