本文整理汇总了C++中KisConfig::writeEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ KisConfig::writeEntry方法的具体用法?C++ KisConfig::writeEntry怎么用?C++ KisConfig::writeEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KisConfig
的用法示例。
在下文中一共展示了KisConfig::writeEntry方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gc
void KisOpenGLCanvas2::paintGL()
{
if (!OPENGL_SUCCESS) {
KisConfig cfg;
cfg.writeEntry("canvasState", "OPENGL_PAINT_STARTED");
}
KisOpenglCanvasDebugger::instance()->nofityPaintRequested();
renderCanvasGL();
if (d->glSyncObject) {
Sync::deleteSync(d->glSyncObject);
}
d->glSyncObject = Sync::getSync();
QPainter gc(this);
renderDecorations(&gc);
gc.end();
if (!OPENGL_SUCCESS) {
KisConfig cfg;
cfg.writeEntry("canvasState", "OPENGL_SUCCESS");
OPENGL_SUCCESS = true;
}
}
示例2: QOpenGLWidget
KisOpenGLCanvas2::KisOpenGLCanvas2(KisCanvas2 *canvas,
KisCoordinatesConverter *coordinatesConverter,
QWidget *parent,
KisImageWSP image,
KisDisplayColorConverter *colorConverter)
: QOpenGLWidget(parent)
, KisCanvasWidgetBase(canvas, coordinatesConverter)
, d(new Private())
{
KisConfig cfg;
cfg.writeEntry("canvasState", "OPENGL_STARTED");
d->openGLImageTextures =
KisOpenGLImageTextures::getImageTextures(image,
colorConverter->monitorProfile(),
colorConverter->renderingIntent(),
colorConverter->conversionFlags());
setAcceptDrops(true);
setAutoFillBackground(false);
setFocusPolicy(Qt::StrongFocus);
setAttribute(Qt::WA_NoSystemBackground, true);
#ifdef Q_OS_OSX
setAttribute(Qt::WA_AcceptTouchEvents, false);
#else
setAttribute(Qt::WA_AcceptTouchEvents, true);
#endif
setAttribute(Qt::WA_InputMethodEnabled, true);
setAttribute(Qt::WA_DontCreateNativeAncestors, true);
setDisplayFilterImpl(colorConverter->displayFilter(), true);
connect(KisConfigNotifier::instance(), SIGNAL(configChanged()), SLOT(slotConfigChanged()));
slotConfigChanged();
cfg.writeEntry("canvasState", "OPENGL_SUCCESS");
}
示例3: saveSettings
void KisColorSelector::saveSettings()
{
KisConfig cfg;
cfg.writeEntry("ArtColorSel.ColorSpace" , qint32(m_colorSpace));
cfg.writeEntry("ArtColorSel.NumRings" , m_colorRings.size());
cfg.writeEntry("ArtColorSel.RingPieces" , qint32(m_numPieces));
cfg.writeEntry("ArtColorSel.LightPieces", qint32(m_numLightPieces));
cfg.writeEntry("ArtColorSel.InversedSaturation", m_inverseSaturation);
cfg.writeEntry("ArtColorSel.RelativeLight" , m_relativeLight);
cfg.writeEntry("ArtColorSel.Light" , m_light);
cfg.writeEntry("ArtColorSel.SelColorH", m_selectedColor.getH());
cfg.writeEntry("ArtColorSel.SelColorS", m_selectedColor.getS());
cfg.writeEntry("ArtColorSel.SelColorX", m_selectedColor.getX());
cfg.writeEntry("ArtColorSel.SelColorA", m_selectedColor.getA());
QList<float> angles;
for(int i=0; i<m_colorRings.size(); ++i)
angles.push_back(m_colorRings[i].angle.value());
cfg.writeList("ArtColorSel.RingAngles", angles);
}