bool TEvManMainManager::Initialize() { Q_D(TEvManMainManager); ExtSys::TPluginManager *pm = ExtSys::TPluginManager::Instance(); pm->AddObject(d->DBSettings); CorePlugin::TActionManager *am = CorePlugin::ICore::Instance()->ActionManager(); QAction *Action; CorePlugin::TAction *Cmd; QMenu *FileMenu = am->Menu(CorePlugin::Constants::MENU_FILE); Action = new QAction(QIcon(Constants::ICON_SYNC_ALL), "Sync All", CorePlugin::ICore::Instance()->MainWindow()); Cmd = am->RegisterAction(Action, Constants::ACTION_SYNC_ALL, CorePlugin::TContext() << CorePlugin::Constants::CONTEXT_GLOBAL, CorePlugin::ICore::Instance()->MainWindow()); FileMenu->addAction(Cmd->Action()); Cmd->SetDefaultKeySequence(QKeySequence("Ctrl+Shift+S")); connect(Action, SIGNAL(triggered()), this, SLOT(SyncAll())); QMenu *Tools = am->Menu(CorePlugin::Constants::MENU_TOOLS); Action = new QAction("Backup Now", CorePlugin::ICore::Instance()->MainWindow()); Cmd = am->RegisterAction(Action, Constants::ACTION_BACKUP_NOW, CorePlugin::TContext() << CorePlugin::Constants::CONTEXT_GLOBAL, CorePlugin::ICore::Instance()->MainWindow()); Tools->addAction(Cmd->Action()); Cmd->SetDefaultKeySequence(QKeySequence("Ctrl+Shift+B")); connect(Action, SIGNAL(triggered()), d->BackupAndRestoreManager, SLOT(MakeBackup())); d->BackupAndRestoreManager->Initialize(); return true; }
DockWindow & DockWindow::AutoHide(bool v) { if (v != autohide) { autohide = v; SyncAll(); } return *this; }
DockWindow & DockWindow::Grouping(bool _grouping) { if (_grouping != grouping) { grouping = _grouping; SyncAll(); } return *this; }
DockWindow & DockWindow::WindowButtons(bool menu, bool hide, bool close) { if (menu == menubtn && close == closebtn && hide == hidebtn) return *this;; menubtn = menu; closebtn = close; hidebtn = hide; SyncAll(); return *this; }
void DockWindow::SerializeWindow(Stream &s) { int version = 3; int v = version; s / v; ASSERT(v == version); SerializeLayout(s, true); s % tabbing % autohide % animatehl % nestedtabs % grouping % menubtn % closebtn % hidebtn; if (s.IsLoading()) { // Note: Ensure correct load of added params. Can be depreciated in future and added to main // serialization above. if (!s.IsEof()) s % nesttoggle; SyncAll(); } else s % nesttoggle; }