Example #1
0
    Managers (const ICoreProxy_ptr& proxy)
        : UncloseMgr_ { proxy, &TabsPropsMgr_ }
        , SessionsMgr_ { proxy, &TabsPropsMgr_ }
        , SessionMenuMgr_ { &SessionsMgr_ }
    {
        QObject::connect (&SessionMenuMgr_,
                          SIGNAL (loadRequested (QString)),
                          &SessionsMgr_,
                          SLOT (loadCustomSession (QString)));
        QObject::connect (&SessionMenuMgr_,
                          SIGNAL (addRequested (QString)),
                          &SessionsMgr_,
                          SLOT (addCustomSession (QString)));
        QObject::connect (&SessionMenuMgr_,
                          SIGNAL (deleteRequested (QString)),
                          &SessionsMgr_,
                          SLOT (deleteCustomSession (QString)));
        QObject::connect (&SessionMenuMgr_,
                          SIGNAL (saveCustomSessionRequested ()),
                          &SessionsMgr_,
                          SLOT (saveCustomSession ()));

        QObject::connect (&SessionsMgr_,
                          SIGNAL (gotCustomSession (QString)),
                          &SessionMenuMgr_,
                          SLOT (addCustomSession (QString)));
    }
Example #2
0
	void Plugin::Init (ICoreProxy_ptr proxy)
	{
		Util::InstallTranslator ("tabsessmanager");

		TabsPropsMgr_ = std::make_shared<TabsPropsManager> ();

		UncloseMgr_ = new UncloseManager { proxy, TabsPropsMgr_.get () };

		SessionsMgr_ = new SessionsManager { proxy, TabsPropsMgr_.get () };

		SessionMenuMgr_ = new SessionMenuManager { SessionsMgr_ };
		connect (SessionMenuMgr_,
				SIGNAL (loadRequested (QString)),
				SessionsMgr_,
				SLOT (loadCustomSession (QString)));
		connect (SessionMenuMgr_,
				SIGNAL (addRequested (QString)),
				SessionsMgr_,
				SLOT (addCustomSession (QString)));
		connect (SessionMenuMgr_,
				SIGNAL (deleteRequested (QString)),
				SessionsMgr_,
				SLOT (deleteCustomSession (QString)));
		connect (SessionMenuMgr_,
				SIGNAL (saveCustomSessionRequested ()),
				SessionsMgr_,
				SLOT (saveCustomSession ()));

		connect (SessionsMgr_,
				SIGNAL (gotCustomSession (QString)),
				SessionMenuMgr_,
				SLOT (addCustomSession (QString)));

		Proxy_ = proxy;

		for (const auto& name : SessionsMgr_->GetCustomSessions ())
			SessionMenuMgr_->addCustomSession (name);
	}
Example #3
0
	void Plugin::Init (ICoreProxy_ptr proxy)
	{
		Util::InstallTranslator ("tabsessmanager");

		UncloseMenu_ = new QMenu (tr ("Unclose tabs"));

		SessionsMgr_ = new SessionsManager { proxy };

		SessionMenuMgr_ = new SessionMenuManager;
		connect (SessionMenuMgr_,
				SIGNAL (loadRequested (QString)),
				SessionsMgr_,
				SLOT (loadCustomSession (QString)));
		connect (SessionMenuMgr_,
				SIGNAL (addRequested (QString)),
				SessionsMgr_,
				SLOT (addCustomSession (QString)));
		connect (SessionMenuMgr_,
				SIGNAL (deleteRequested (QString)),
				SessionsMgr_,
				SLOT (deleteCustomSession (QString)));
		connect (SessionMenuMgr_,
				SIGNAL (saveCustomSessionRequested ()),
				SessionsMgr_,
				SLOT (saveCustomSession ()));

		connect (SessionsMgr_,
				SIGNAL (gotCustomSession (QString)),
				SessionMenuMgr_,
				SLOT (addCustomSession (QString)));

		Proxy_ = proxy;

		for (const auto& name : SessionsMgr_->GetCustomSessions ())
			SessionMenuMgr_->addCustomSession (name);
	}