static void DoSync(Common::Serializer &s) { syncBasicInfo(s); _vm->sound().doSync(s); syncPalette(s, newPal); syncPalette(s, workpal); s.syncBytes((byte *)currentCtpName, 40); syncBackgroundTable(s); syncPalScreen(s); syncSoundList(s); for (int i = 0; i < stateID; ++i) s.syncAsSint16LE(globalVars[i]); syncFilesDatabase(s); syncOverlays1(s); syncPreloadData(s); syncOverlays2(s); syncScript(s, &procHead); syncScript(s, &relHead); syncCell(s); syncIncrust(s); syncActors(s); syncSongs(s); syncCT(s); }
KRunnerConfigWidget::KRunnerConfigWidget(Plasma::RunnerManager *manager, QWidget *parent) : QWidget(parent), m_preview(0), m_manager(manager) { m_tabWidget = new KTabWidget(this); m_sel = new KPluginSelector(m_tabWidget); m_tabWidget->addTab(m_sel, i18n("Plugins")); QWidget *m_generalSettings = new QWidget(m_tabWidget); //QVBoxLayout *genLayout = new QVBoxLayout(m_generalSettings); m_interfaceType = KRunnerSettings::interface(); m_uiOptions.setupUi(m_generalSettings); syncPalette(); connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(syncPalette())); QButtonGroup *positionButtons = new QButtonGroup(m_generalSettings); positionButtons->addButton(m_uiOptions.topEdgeButton); positionButtons->addButton(m_uiOptions.freeFloatingButton); m_uiOptions.freeFloatingButton->setChecked(KRunnerSettings::freeFloating()); QButtonGroup *displayButtons = new QButtonGroup(m_generalSettings); connect(displayButtons, SIGNAL(buttonClicked(int)), this, SLOT(setInterface(int))); displayButtons->addButton(m_uiOptions.commandButton, KRunnerSettings::EnumInterface::CommandOriented); displayButtons->addButton(m_uiOptions.taskButton, KRunnerSettings::EnumInterface::TaskOriented); if (m_interfaceType == KRunnerSettings::EnumInterface::CommandOriented) { m_uiOptions.commandButton->setChecked(true); } else { m_uiOptions.taskButton->setChecked(true); } connect(m_uiOptions.previewButton, SIGNAL(clicked()), this, SLOT(previewInterface())); m_tabWidget->addTab(m_generalSettings, i18n("User Interface")); connect(m_sel, SIGNAL(configCommitted(QByteArray)), this, SLOT(updateRunner(QByteArray))); QTimer::singleShot(0, this, SLOT(load())); m_buttons = new QDialogButtonBox(this); m_buttons->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel); connect(m_buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(save(QAbstractButton*))); connect(m_buttons, SIGNAL(rejected()), this, SIGNAL(finished())); QVBoxLayout *topLayout = new QVBoxLayout(this); topLayout->addWidget(m_tabWidget); topLayout->addWidget(m_buttons); }