当前位置: 首页>>代码示例>>C++>>正文


C++ HBoxLayout::setVerticalAlignment方法代码示例

本文整理汇总了C++中HBoxLayout::setVerticalAlignment方法的典型用法代码示例。如果您正苦于以下问题:C++ HBoxLayout::setVerticalAlignment方法的具体用法?C++ HBoxLayout::setVerticalAlignment怎么用?C++ HBoxLayout::setVerticalAlignment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HBoxLayout的用法示例。


在下文中一共展示了HBoxLayout::setVerticalAlignment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);

}
开发者ID:91yuan,项目名称:ilixi,代码行数:60,代码来源:StatusBar.cpp


注:本文中的HBoxLayout::setVerticalAlignment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。