本文整理汇总了C++中KisConfig::getMDIBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:C++ KisConfig::getMDIBackgroundColor方法的具体用法?C++ KisConfig::getMDIBackgroundColor怎么用?C++ KisConfig::getMDIBackgroundColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KisConfig
的用法示例。
在下文中一共展示了KisConfig::getMDIBackgroundColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pal
PaletteDockerDock::PaletteDockerDock( )
: QDockWidget(i18n("Palette"))
, m_wdgPaletteDock(new Ui_WdgPaletteDock())
, m_currentColorSet(0)
, m_resourceProvider(0)
, m_canvas(0)
{
QWidget* mainWidget = new QWidget(this);
setWidget(mainWidget);
m_wdgPaletteDock->setupUi(mainWidget);
m_wdgPaletteDock->bnAdd->setIcon(KisIconUtils::loadIcon("list-add"));
m_wdgPaletteDock->bnAdd->setIconSize(QSize(16, 16));
m_wdgPaletteDock->bnAddDialog->setIcon(KisIconUtils::loadIcon("document-new"));
m_wdgPaletteDock->bnAddDialog->setIconSize(QSize(16, 16));
m_wdgPaletteDock->bnRemove->setIcon(KisIconUtils::loadIcon("edit-delete"));
m_wdgPaletteDock->bnRemove->setIconSize(QSize(16, 16));
m_wdgPaletteDock->bnAdd->setEnabled(false);
m_wdgPaletteDock->bnRemove->setEnabled(false);
connect(m_wdgPaletteDock->bnAdd, SIGNAL(clicked(bool)), this, SLOT(addColorForeground()));
connect(m_wdgPaletteDock->bnAddDialog, SIGNAL(clicked(bool)), this, SLOT(addColor()));
connect(m_wdgPaletteDock->bnRemove, SIGNAL(clicked(bool)), this, SLOT(removeColor()));
m_model = new PaletteModel(this);
m_wdgPaletteDock->paletteView->setModel(m_model);
m_wdgPaletteDock->paletteView->setShowGrid(false);
m_wdgPaletteDock->paletteView->horizontalHeader()->setVisible(false);
m_wdgPaletteDock->paletteView->verticalHeader()->setVisible(false);
m_wdgPaletteDock->paletteView->setItemDelegate(new PaletteDelegate());
KisConfig cfg;
QPalette pal(palette());
pal.setColor(QPalette::Base, cfg.getMDIBackgroundColor());
m_wdgPaletteDock->paletteView->setAutoFillBackground(true);
m_wdgPaletteDock->paletteView->setPalette(pal);
connect(m_wdgPaletteDock->paletteView, SIGNAL(clicked(QModelIndex)), this, SLOT(entrySelected(QModelIndex)));
m_wdgPaletteDock->paletteView->viewport()->installEventFilter(this);
KoResourceServer<KoColorSet>* rServer = KoResourceServerProvider::instance()->paletteServer(false);
m_serverAdapter = QSharedPointer<KoAbstractResourceServerAdapter>(new KoResourceServerAdapter<KoColorSet>(rServer));
m_serverAdapter->connectToResourceServer();
rServer->addObserver(this);
m_colorSetChooser = new ColorSetChooser(this);
connect(m_colorSetChooser, SIGNAL(paletteSelected(KoColorSet*)), this, SLOT(setColorSet(KoColorSet*)));
m_wdgPaletteDock->bnColorSets->setIcon(KisIconUtils::loadIcon("hi16-palette_library"));
m_wdgPaletteDock->bnColorSets->setToolTip(i18n("Choose palette"));
m_wdgPaletteDock->bnColorSets->setPopupWidget(m_colorSetChooser);
int defaultSectionSize = cfg.paletteDockerPaletteViewSectionSize();
m_wdgPaletteDock->paletteView->horizontalHeader()->setDefaultSectionSize(defaultSectionSize);
m_wdgPaletteDock->paletteView->verticalHeader()->setDefaultSectionSize(defaultSectionSize);
QString defaultPalette = cfg.defaultPalette();
KoColorSet* defaultColorSet = rServer->resourceByName(defaultPalette);
if (defaultColorSet) {
setColorSet(defaultColorSet);
}
}