本文整理汇总了C++中HBoxLayout::setSpacing方法的典型用法代码示例。如果您正苦于以下问题:C++ HBoxLayout::setSpacing方法的具体用法?C++ HBoxLayout::setSpacing怎么用?C++ HBoxLayout::setSpacing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HBoxLayout
的用法示例。
在下文中一共展示了HBoxLayout::setSpacing方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Application
ILXStatusBar::ILXStatusBar(int argc, char* argv[])
: Application(&argc, &argv, (AppOptions) (OptDaleAuto))
{
setBackgroundImage(ILIXI_DATADIR"car/statusbar/statusbar_bg.png");
setMargins(0, 0, 0, 0);
HBoxLayout* mainLayout = new HBoxLayout();
mainLayout->setVerticalAlignment(Alignment::Middle);
mainLayout->setSpacing(0);
setLayout(mainLayout);
_home = new StatusbarButton();
_home->addImage(new Image(ILIXI_DATADIR"car/statusbar/home.png", Size(48, 48)));
_home->addImage(new Image(ILIXI_DATADIR"car/statusbar/homeG.png", Size(48, 48)));
_home->setActive(1);
_home->sigClicked.connect(sigc::mem_fun(this, &ILXStatusBar::clickedHome));
addWidget(_home);
_switch = new StatusbarButton();
_switch->addImage(new Image(ILIXI_DATADIR"car/statusbar/switch.png", Size(48, 48)));
_switch->addImage(new Image(ILIXI_DATADIR"car/statusbar/switchG.png", Size(48, 48)));
_switch->sigClicked.connect(sigc::mem_fun(this, &ILXStatusBar::clickedSwitcher));
addWidget(_switch);
_dash = new StatusbarButton();
_dash->addImage(new Image(ILIXI_DATADIR"car/statusbar/dash.png", Size(48, 48)));
_dash->addImage(new Image(ILIXI_DATADIR"car/statusbar/dashG.png", Size(48, 48)));
_dash->sigClicked.connect(sigc::mem_fun(this, &ILXStatusBar::clickedDash));
addWidget(_dash);
_sound = new StatusbarButton();
_sound->addImage(new Image(ILIXI_DATADIR"car/statusbar/vol0.png", Size(48, 48)));
_sound->addImage(new Image(ILIXI_DATADIR"car/statusbar/vol0G.png", Size(48, 48)));
_sound->addImage(new Image(ILIXI_DATADIR"car/statusbar/vol1.png", Size(48, 48)));
_sound->addImage(new Image(ILIXI_DATADIR"car/statusbar/vol1G.png", Size(48, 48)));
_sound->addImage(new Image(ILIXI_DATADIR"car/statusbar/vol2.png", Size(48, 48)));
_sound->addImage(new Image(ILIXI_DATADIR"car/statusbar/vol2G.png", Size(48, 48)));
_sound->addImage(new Image(ILIXI_DATADIR"car/statusbar/vol3.png", Size(48, 48)));
_sound->addImage(new Image(ILIXI_DATADIR"car/statusbar/vol3G.png", Size(48, 48)));
_sound->sigClicked.connect(sigc::mem_fun(this, &ILXStatusBar::clickedSound));
_sound->setButtonState(6);
addWidget(_sound);
_back = new StatusbarButton();
_back->setVisible(false);
_back->addImage(new Image(ILIXI_DATADIR"car/statusbar/back0.png", Size(48, 48)));
_back->sigClicked.connect(sigc::mem_fun(this, &ILXStatusBar::clickedBack));
addWidget(_back);
addWidget(new Clock());
_rca = new RemoteContentArea();
addWidget(_rca);
sigVisible.connect(sigc::mem_fun(this, &ILXStatusBar::onShow));
sigHidden.connect(sigc::mem_fun(this, &ILXStatusBar::onHide));
_statComp = new StatusbarComponent(this);
}
示例2: HBoxLayout_setSpacing
/** void QBoxLayout::setSpacing(int space)
* bind/QBoxLayout.h:19
*/
static int HBoxLayout_setSpacing(lua_State *L) {
try {
HBoxLayout *self = *((HBoxLayout **)dub_checksdata(L, 1, "mimas.HBoxLayout"));
int space = dub_checkint(L, 2);
self->setSpacing(space);
return 0;
} catch (std::exception &e) {
lua_pushfstring(L, "setSpacing: %s", e.what());
} catch (...) {
lua_pushfstring(L, "setSpacing: Unknown exception");
}
return dub_error(L);
}