本文整理汇总了C++中PrefDialog::addColorPrefItem方法的典型用法代码示例。如果您正苦于以下问题:C++ PrefDialog::addColorPrefItem方法的具体用法?C++ PrefDialog::addColorPrefItem怎么用?C++ PrefDialog::addColorPrefItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PrefDialog
的用法示例。
在下文中一共展示了PrefDialog::addColorPrefItem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: prefDialog
void VerticalLine::prefDialog ()
{
QString pl = tr("Details");
QString cl = tr("Color");
QString sd = tr("Set Default");
PrefDialog *dialog = new PrefDialog();
dialog->setCaption(tr("Edit VerticalLine"));
dialog->createPage (pl);
dialog->setHelpFile (helpFile);
dialog->addColorPrefItem(cl, pl, color);
dialog->addCheckItem(sd, pl, FALSE);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
dialog->getColor(cl, color);
bool f = dialog->getCheck(sd);
if (f)
{
defaultColor = color;
saveDefaults();
}
emit signalDraw();
}
delete dialog;
}
示例2: prefDialog
void Text::prefDialog ()
{
QString pl = tr("Details");
QString cl = tr("Color");
QString sd = tr("Set Default");
QString fl = tr("Font");
QString ll = tr("Label");
QString vl = tr("Value");
PrefDialog *dialog = new PrefDialog();
dialog->setCaption(tr("Edit Text"));
dialog->createPage (pl);
dialog->setHelpFile (helpFile);
dialog->addColorPrefItem(cl, pl, color);
dialog->addFontItem(fl, pl, font);
dialog->addTextItem(ll, pl, label);
dialog->addDoubleItem(vl, pl, getValue());
dialog->addCheckItem(sd, pl, FALSE);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
dialog->getColor(cl, color);
dialog->getText(ll, label);
dialog->getFont(fl, font);
value = dialog->getDouble(vl);
setSaveFlag(TRUE);
bool f = dialog->getCheck(sd);
if (f)
{
dialog->getColor(cl, defaultColor);
dialog->getFont(fl, dfont);
saveDefaults();
}
emit signalDraw();
}
delete dialog;
}
示例3: prefDialog
void SellArrow::prefDialog ()
{
QString pl = tr("Details");
QString cl = tr("Color");
QString vl = tr("Value");
QString il = tr("Identifier");
QString bl = tr("Price");
QString sd = tr("Set Default");
PrefDialog *dialog = new PrefDialog();
dialog->setCaption(tr("Edit SellArrow"));
dialog->createPage (pl);
dialog->setHelpFile (helpFile);
dialog->addColorPrefItem(cl, pl, color);
dialog->addDoubleItem(vl, pl, getValue());
dialog->addTextItem(il, pl, identifier);
dialog->addTextItem(bl, pl, price);
dialog->addCheckItem(sd, pl, FALSE);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
dialog->getColor(cl, color);
value = dialog->getDouble(vl);
dialog->getText(il, identifier);
dialog->getText(bl, price);
setSaveFlag(TRUE);
bool f = dialog->getCheck(sd);
if (f)
{
defaultColor = color;
saveDefaults();
}
emit signalDraw();
}
delete dialog;
}
示例4: prefDialog
void HorizontalLine::prefDialog ()
{
QString pl = tr("Details");
QString cl = tr("Color");
QString sd = tr("Set Default");
QString vl = tr("Value");
QString tx = tr("Text");
PrefDialog *dialog = new PrefDialog();
dialog->setCaption(tr("Edit HorizontalLine"));
dialog->createPage (pl);
dialog->setHelpFile (helpFile);
dialog->addColorPrefItem(cl, pl, color);
dialog->addDoubleItem(vl, pl, getValue());
dialog->addTextItem(tx, pl, text); //cz odkazy na objekty definovane nahore
dialog->addCheckItem(sd, pl, FALSE);
int rc = dialog->exec();
if (rc == QDialog::Accepted)
{
dialog->getColor(cl, color);
value = dialog->getDouble(vl);
dialog->getText(tx, text);
setSaveFlag(TRUE);
bool f = dialog->getCheck(sd);
if (f)
{
defaultColor = color;
saveDefaults();
}
emit signalDraw();
}
delete dialog;
}