本文整理汇总了C++中QDoubleSpinBox::maximum方法的典型用法代码示例。如果您正苦于以下问题:C++ QDoubleSpinBox::maximum方法的具体用法?C++ QDoubleSpinBox::maximum怎么用?C++ QDoubleSpinBox::maximum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDoubleSpinBox
的用法示例。
在下文中一共展示了QDoubleSpinBox::maximum方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test_constructor
void GraphicalIntTest::test_constructor()
{
GraphicalInt * value = new GraphicalInt(false);
QDoubleSpinBox * spinBox = findSpinBox(value);
QVERIFY( is_not_null(spinBox) );
// 1. check the range
QCOMPARE( spinBox->minimum(), Consts::int_min() );
QCOMPARE( spinBox->maximum(), Consts::int_max() );
// 2. value is empty, the line edit should be empty as well
QCOMPARE( int(spinBox->value()), 0 );
delete value;
value = new GraphicalInt(false, 1456);
spinBox = findSpinBox(value);
// 3. value is not empty
QVERIFY( is_not_null(spinBox) );
QCOMPARE( int(spinBox->value()), 1456 );
delete value;
}
示例2: GenHTMLForm
QByteArray TableItem::GenHTMLForm() {
QString ret;
QString objTypeName = obj->metaObject()->className();
if(objTypeName == "QPlainTextEdit") {
QPlainTextEdit *item = (QPlainTextEdit *) obj;
#if 0
ret = QString("<form method=\"post\">"
" <input type=\"hidden\" name=\"action\" value=\"%2\">"
"<div class=\"form_info\">%1</div>"
"<div class=\"form_editor\"><textarea name=\"%2\" cols=\"20\" rows=\"4\">%3</textarea></div>"
"<div class=\"form_submitter\"><input type=\"submit\" value=\">>\"></div>"
"<div class=\"form_tooltip\">%4</div>"
"</form>")
.arg(desc).arg(short_d).arg(item->toPlainText()).arg(item->toolTip());
#endif
ret = QString("<form method=\"post\"><input type=\"hidden\" name=\"action\" value=\"%2\" />"
"<div class=\"row\">"
"<div class=\"prop\"><p>%1:</p></div>"
"<div class=\"val\"><p><textarea name=\"%2\" cols=\"16\" rows=\"3\">%3</textarea></p></div>"
"<div class=\"submit\"><p> %4</p></div>"
"<div class=\"tooltip\"><p> %5</p></div>"
"</div></form>\n")
.arg(desc)
.arg(short_d)
.arg(item->toPlainText())
.arg((!item->isEnabled() || item->isReadOnly()) ? "" : "<input type=\"submit\" value=\">>\" />")
.arg(item->toolTip());
}
else if(objTypeName == "QLineEdit") {
QLineEdit *item = (QLineEdit *) obj;
ret = QString("<form method=\"post\"><input type=\"hidden\" name=\"action\" value=\"%2\" />"
"<div class=\"row\">"
"<div class=\"prop\"><p>%1:</p></div>"
"<div class=\"val\"><p><input type=\"text\" name=\"%2\" value=\"%3\" /></p></div>"
"<div class=\"submit\"><p> %4</p></div>"
"<div class=\"tooltip\"><p> %5</p></div>"
"</div></form>\n")
.arg(desc)
.arg(short_d)
.arg(item->text())
.arg((!item->isEnabled() || item->isReadOnly()) ? "" : "<input type=\"submit\" value=\">>\" />")
.arg(item->toolTip());
}
else if(objTypeName == "QCheckBox") {
QCheckBox *item = (QCheckBox *) obj;
ret = QString("<form method=\"post\"><input type=\"hidden\" name=\"action\" value=\"%2\" />"
"<div class=\"row\">"
"<div class=\"prop\"><p>%1:</p></div>"
"<div class=\"val\"><p><input type=\"checkbox\" name=\"%2\" value=\"true\" %3/></p></div>"
"<div class=\"submit\"><p> %4</p></div>"
"<div class=\"tooltip\"><p> %5</p></div>"
"</div></form>\n")
.arg(desc)
.arg(short_d)
.arg(item->isChecked() ? "checked" : "")
.arg((!item->isEnabled()) ? "" : "<input type=\"submit\" value=\">>\" />")
.arg(item->toolTip());
}
else if(objTypeName == "QSpinBox") {
QSpinBox *item = (QSpinBox *) obj;
ret = QString("<form method=\"post\"><input type=\"hidden\" name=\"action\" value=\"%2\" />"
"<div class=\"row\">"
"<div class=\"prop\"><p>%1:</p></div>"
"<div class=\"val\"><p><input type=\"number\" name=\"%2\" value=\"%3\" min=\"%4\" max=\"%5\" step=\"%6\" /></p></div>"
"<div class=\"submit\"><p> %7</p></div>"
"<div class=\"tooltip\"><p> %8</p></div>"
"</div></form>\n")
.arg(desc)
.arg(short_d)
.arg(item->value())
.arg(item->minimum())
.arg(item->maximum())
.arg(item->singleStep())
.arg((!item->isEnabled() || item->isReadOnly()) ? "" : "<input type=\"submit\" value=\">>\" />")
.arg(item->toolTip());
}
else if(objTypeName == "QDoubleSpinBox") {
QDoubleSpinBox *item = (QDoubleSpinBox *) obj;
ret = QString("<form method=\"post\"><input type=\"hidden\" name=\"action\" value=\"%2\" />"
"<div class=\"row\">"
"<div class=\"prop\"><p>%1:</p></div>"
"<div class=\"val\"><p><input type=\"number\" name=\"%2\" value=\"%3\" min=\"%4\" max=\"%5\" step=\"%6\" /></p></div>"
"<div class=\"submit\"><p> %7</p></div>"
"<div class=\"tooltip\"><p> %8</p></div>"
"</div></form>\n")
.arg(desc)
.arg(short_d)
.arg(item->value())
.arg(item->minimum())
.arg(item->maximum())
.arg(item->singleStep())
.arg((!item->isEnabled() || item->isReadOnly()) ? "" : "<input type=\"submit\" value=\">>\" />")
.arg(item->toolTip());
}
else if(objTypeName == "QComboBox") {
//.........这里部分代码省略.........