本文整理汇总了C++中KToggleAction::isChecked方法的典型用法代码示例。如果您正苦于以下问题:C++ KToggleAction::isChecked方法的具体用法?C++ KToggleAction::isChecked怎么用?C++ KToggleAction::isChecked使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KToggleAction
的用法示例。
在下文中一共展示了KToggleAction::isChecked方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: enableToolbar
void KMMainView::enableToolbar(bool on)
{
KToggleAction *act = (KToggleAction *)m_actions->action("view_toolbar");
m_toolbar->setEnabled(on);
act->setEnabled(on);
if(on && act->isChecked())
m_toolbar->show();
else
m_toolbar->hide();
}
示例2: saveConfig
void JuK::saveConfig()
{
// player settings
KConfigGroup playerConfig(KGlobal::config(), "Player");
if (m_sliderAction->volumeSlider())
{
playerConfig.writeEntry("Volume", m_sliderAction->volumeSlider()->volume());
}
playerConfig.writeEntry("RandomPlay", m_randomPlayAction->isChecked());
KToggleAction *a = ActionCollection::action<KToggleAction>("loopPlaylist");
playerConfig.writeEntry("LoopPlaylist", a->isChecked());
a = ActionCollection::action<KToggleAction>("albumRandomPlay");
if(a->isChecked())
playerConfig.writeEntry("RandomPlay", "AlbumRandomPlay");
else if(m_randomPlayAction->isChecked())
playerConfig.writeEntry("RandomPlay", "Normal");
else
playerConfig.writeEntry("RandomPlay", "Disabled");
// general settings
KConfigGroup settingsConfig(KGlobal::config(), "Settings");
settingsConfig.writeEntry("ShowSplashScreen", m_toggleSplashAction->isChecked());
settingsConfig.writeEntry("StartDocked", m_startDocked);
settingsConfig.writeEntry("DockInSystemTray", m_toggleSystemTrayAction->isChecked());
settingsConfig.writeEntry("DockOnClose", m_toggleDockOnCloseAction->isChecked());
settingsConfig.writeEntry("TrackPopup", m_togglePopupsAction->isChecked());
if(m_outputSelectAction)
settingsConfig.writeEntry("MediaSystem", m_outputSelectAction->currentItem());
KGlobal::config()->sync();
}