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


C++ QRadioButton::move方法代码示例

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


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

示例1: QWidget

RaspiLcdWidget::RaspiLcdWidget( QWidget *parent )
  : QWidget(parent)
  , m_image(128,64,QImage::Format_Mono)
  , m_keyPressed(eKeyNone)
{
  QRgb value;
  value = m_background.rgb();
  m_image.setColor(0, value);
  value = QColor(Qt::black).rgb();
  m_image.setColor(1, value);

  QRadioButton *butA = new QRadioButton(this);
  butA->move(24+marginx,160+marginy);
  butA->setCheckable(false);
  registerKey(butA,eKeyA);

  QRadioButton *butB = new QRadioButton(this);
  butB->move(120+marginx,160+marginy);
  butB->setCheckable(false);
  registerKey(butB,eKeyB);

  QRadioButton *butC = new QRadioButton(this);
  butC->move(216+marginx,160+marginy);
  butC->setCheckable(false);
  registerKey(butC,eKeyC);

  QRadioButton *butD = new QRadioButton(this);
  butD->move(300+marginx,160+marginy);
  butD->setCheckable(false);
  registerKey(butD,eKeyD);

  QRadioButton *butUp = new QRadioButton(this);
  butUp->move(300+marginx,10+marginy);
  butUp->setCheckable(false);
  registerKey(butUp,eKeyUp);

  QRadioButton *butDown = new QRadioButton(this);
  butDown->move(300+marginx,96+marginy);
  butDown->setCheckable(false);
  registerKey(butDown,eKeyDown);

  resize(350+2*marginx,200+2*marginy);

  startTimer(100);
}
开发者ID:ValentinIllich,项目名称:Raspi-Hifi,代码行数:45,代码来源:QtEmulation.cpp

示例2: pos

MeasuringReceiver::MeasuringReceiver(Device *devicePtr,
                                     double initialCenter,
                                     QWidget *parent) :
    QDialog(parent),
    device(devicePtr),
    running(true),
    reinitialize(true),
    recalibrate(true)
{
    setWindowTitle("Measuring Receiver");
    setObjectName("SH_Page");
    setFixedWidth(400);

    QPoint pos(0, 0); // For positioning widgets

    Label *title = new Label("Synchronous Level Detector", this);
    title->move(QPoint(5, pos.y()));
    title->resize(width(), WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT+5);
    freqEntry = new FrequencyEntry("Center Freq", initialCenter, this);
    freqEntry->move(pos);
    freqEntry->resize(width() * 0.75, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT+5);

    Label *ampRangeLabel = new Label("Amplitude Range", this);
    ampRangeLabel->move(QPoint(5, pos.y()));
    ampRangeLabel->resize(width(), WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    ampGroup = new QButtonGroup(this);
    QRadioButton *highAmp = new QRadioButton("High Power Range", this),
            *midAmp = new QRadioButton("Mid Power Range", this),
            *lowAmp = new QRadioButton("Low Power Range", this);

    highAmp->move(pos);
    highAmp->resize(width()/2, WIDGET_HEIGHT);
    highAmp->setObjectName("SHPrefRadioButton");
    highAmp->setChecked(true);
    ampGroup->addButton(highAmp, MeasRcvrRangeHigh);

    highLabel = new Label("", this);
    highLabel->move(QPoint(width()/2, pos.y()));
    highLabel->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    midAmp->move(pos);
    midAmp->resize(width()/2, WIDGET_HEIGHT);
    midAmp->setObjectName("SHPrefRadioButton");
    ampGroup->addButton(midAmp, MeasRcvrRangeMid);

    midLabel = new Label("", this);
    midLabel->move(QPoint(width()/2, pos.y()));
    midLabel->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    lowAmp->move(pos);
    lowAmp->resize(width()/2, WIDGET_HEIGHT);
    lowAmp->setObjectName("SHPrefRadioButton");
    ampGroup->addButton(lowAmp, MeasRcvrRangeLow);

    lowLabel = new Label("", this);
    lowLabel->move(QPoint(width()/2, pos.y()));
    lowLabel->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT+5);

    Label *centerLabel = new Label("RF Frequency", this);
    centerLabel->move(QPoint(5, pos.y()));
    centerLabel->resize(width()/2, WIDGET_HEIGHT);
    centerReadout = new Label("915.11002 MHz", this);
    centerReadout->move(QPoint(width()/2 + 5, pos.y()));
    centerReadout->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    Label *powerLabel = new Label("RF Power", this);
    powerLabel->move(QPoint(5, pos.y()));
    powerLabel->resize(width()/2, WIDGET_HEIGHT);
    powerReadout = new Label("-32.22 dBm", this);
    powerReadout->move(QPoint(width()/2 + 5, pos.y()));
    powerReadout->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    Label *relativeLabel = new Label("Relative Power", this);
    relativeLabel->move(QPoint(5, pos.y()));
    relativeLabel->resize(width()/2, WIDGET_HEIGHT);
    relativeReadout = new Label("-5.002 dB", this);
    relativeReadout->move(QPoint(width()/2 + 5, pos.y()));
    relativeReadout->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT);

    Label *averageLabel = new Label("Average Relative Power", this);
    averageLabel->move(QPoint(5, pos.y()));
    averageLabel->resize(width()/2, WIDGET_HEIGHT);
    averageReadout = new Label("-4.998 dB", this);
    averageReadout->move(QPoint(width()/2 + 5, pos.y()));
    averageReadout->resize(width()/2, WIDGET_HEIGHT);
    pos += QPoint(0, WIDGET_HEIGHT*1.5);

    SHPushButton *sync = new SHPushButton("Sync", this);
    sync->move(QPoint(5, pos.y()));
    sync->resize(width()/2 - 10, WIDGET_HEIGHT);
//.........这里部分代码省略.........
开发者ID:hendorog,项目名称:BBApp,代码行数:101,代码来源:measuring_receiver_dialog.cpp


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