/// push error if needed. // @param L the state // @param bval 0 or 1 // @return 1; a boolean true value, or 2, `nil`, last Windows error // @function push_bool int push_bool(lua_State *L, int bval) { if (bval) { return push_ok(L); } else { return push_error(L); } }
customCounter::customCounter(QWidget *parent): QWidget(parent) { /*未実装をユーザーに教えるための一時的な手段としてQLabelを使う*/ msg_l = new QLabel("This implementation isn't done."); /*------------------------------------------------------------*/ ok = new QPushButton(tr("OK")); connect(ok,SIGNAL(clicked()),this,SLOT(push_ok())); QHBoxLayout *mainlayout = new QHBoxLayout(); mainlayout->addWidget(msg_l);// これも一時的な配置 mainlayout->addWidget(ok); setLayout(mainlayout); };