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


C++ WComboBox::currentIndex方法代码示例

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


在下文中一共展示了WComboBox::currentIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WContainerWidget


//.........这里部分代码省略.........
					Wt::asNumber(xMax_->text()));
      }));
  xMax_->changed().connect(std::bind([=] () {
	chart_->axis(XAxis_3D).setRange(Wt::asNumber(xMin_->text()),
					Wt::asNumber(xMax_->text()));
      }));
  yMin_->changed().connect(std::bind([=] () {
	chart_->axis(YAxis_3D).setRange(Wt::asNumber(yMin_->text()),
					  Wt::asNumber(yMax_->text()));
      }));
  yMax_->changed().connect(std::bind([=] () {
	chart_->axis(YAxis_3D).setRange(Wt::asNumber(yMin_->text()),
					  Wt::asNumber(yMax_->text()));
      }));
  zMin_->changed().connect(std::bind([=] () {
	chart_->axis(ZAxis_3D).setRange(Wt::asNumber(zMin_->text()),
					  Wt::asNumber(zMax_->text()));
      }));
  zMax_->changed().connect(std::bind([=] () {
	chart_->axis(ZAxis_3D).setRange(Wt::asNumber(zMin_->text()),
					  Wt::asNumber(zMax_->text()));
      }));

  enableGridLines->checked().connect(std::bind([=]() {
	chart_->setGridEnabled(Wt::Chart::XY_Plane, Wt::Chart::XAxis_3D, true);
	chart_->setGridEnabled(Wt::Chart::XY_Plane, Wt::Chart::YAxis_3D, true);
	chart_->setGridEnabled(Wt::Chart::XZ_Plane, Wt::Chart::XAxis_3D, true);
	chart_->setGridEnabled(Wt::Chart::XZ_Plane, Wt::Chart::ZAxis_3D, true);
	chart_->setGridEnabled(Wt::Chart::YZ_Plane, Wt::Chart::YAxis_3D, true);
	chart_->setGridEnabled(Wt::Chart::YZ_Plane, Wt::Chart::ZAxis_3D, true);
      }));
  enableGridLines->unChecked().connect(std::bind([=]() {
	chart_->setGridEnabled(Wt::Chart::XY_Plane, Wt::Chart::XAxis_3D, false);
	chart_->setGridEnabled(Wt::Chart::XY_Plane, Wt::Chart::YAxis_3D, false);
	chart_->setGridEnabled(Wt::Chart::XZ_Plane, Wt::Chart::XAxis_3D, false);
	chart_->setGridEnabled(Wt::Chart::XZ_Plane, Wt::Chart::ZAxis_3D, false);
	chart_->setGridEnabled(Wt::Chart::YZ_Plane, Wt::Chart::YAxis_3D, false);
	chart_->setGridEnabled(Wt::Chart::YZ_Plane, Wt::Chart::ZAxis_3D, false);
      }));

  enableLegend->checked().connect(std::bind([=]() {
	chart_->setLegendEnabled(true);
      }));
  enableLegend->unChecked().connect(std::bind([=]() {
	chart_->setLegendEnabled(false);
      }));

  legendSide->changed().connect(std::bind([=]() {
	switch (legendSide->currentIndex()) {
	case 0:
	  chart_->setLegendLocation(Left, chart_->legendAlignment()); break;
	case 1:
	  chart_->setLegendLocation(Right, chart_->legendAlignment()); break;
	case 2:
	  chart_->setLegendLocation(Top, chart_->legendAlignment()); break;
	case 3:
	  chart_->setLegendLocation(Bottom, chart_->legendAlignment()); break;
	}
      }));
  legendAlignment->changed().connect(std::bind([=]() {
	switch (legendAlignment->currentIndex()) {
	case 0:
	  chart_->setLegendLocation(chart_->legendSide(), AlignLeft); break;
	case 1:
	  chart_->setLegendLocation(chart_->legendSide(), AlignCenter); break;
	case 2:
	  chart_->setLegendLocation(chart_->legendSide(), AlignRight); break;
	case 3:
	  chart_->setLegendLocation(chart_->legendSide(), AlignTop); break;
	case 4:
	  chart_->setLegendLocation(chart_->legendSide(), AlignMiddle); break;
	case 5:
	  chart_->setLegendLocation(chart_->legendSide(), AlignBottom); break;
	}
      }));

  title->changed().connect(std::bind([=] () {
	chart_->setTitle(Wt::asString(title->text()));
      }));

  widgetWidth->changed().connect(std::bind([=] () {
	chart_->resize(Wt::asNumber(widgetWidth->text()),
		       Wt::asNumber(widgetHeight->text()));
      }));
  widgetHeight->changed().connect(std::bind([=] () {
	chart_->resize(Wt::asNumber(widgetWidth->text()),
		       Wt::asNumber(widgetHeight->text()));
      }));

  xAxisTitle->changed().connect(std::bind([=]() {
	chart_->axis(XAxis_3D).setTitle(xAxisTitle->text());
      }));
  yAxisTitle->changed().connect(std::bind([=]() {
	chart_->axis(YAxis_3D).setTitle(yAxisTitle->text());
      }));
  zAxisTitle->changed().connect(std::bind([=]() {
	chart_->axis(ZAxis_3D).setTitle(zAxisTitle->text());
      }));
  
}
开发者ID:DTidd,项目名称:wt,代码行数:101,代码来源:Tabs.C


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