本文整理汇总了C++中QComboBox::setWhatsThis方法的典型用法代码示例。如果您正苦于以下问题:C++ QComboBox::setWhatsThis方法的具体用法?C++ QComboBox::setWhatsThis怎么用?C++ QComboBox::setWhatsThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QComboBox
的用法示例。
在下文中一共展示了QComboBox::setWhatsThis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ViewWidget
FreqView::FreqView(int viewID_, QWidget *parent)
: ViewWidget(viewID_, parent)
{
View *view = gdata->view;
//setCaption("Frequency View");
Q3BoxLayout *mainLayout = new Q3VBoxLayout(this);
mainLayout->setResizeMode(QLayout::SetNoConstraint);
//QBoxLayout *topLayout = new QVBoxLayout(mainLayout);
//QBoxLayout *rightLayout = new QVBoxLayout(mainLayout);
//QBoxLayout *bottomLayout = new QHBoxLayout(mainLayout);
QSplitter *splitter = new QSplitter(Qt::Vertical, this);
QWidget *topWidget = new QWidget(splitter);
//topSplitter->setOpaqueResize(true);
Q3BoxLayout *topLayout = new Q3HBoxLayout(topWidget);
Q3BoxLayout *topLeftLayout = new Q3VBoxLayout(topLayout);
timeAxis = new TimeAxis(topWidget, gdata->leftTime(), gdata->rightTime(), true);
timeAxis->setWhatsThis("The time in seconds");
topLeftLayout->addWidget(timeAxis);
/*
Q3Grid *freqFrame = new Q3Grid(1, topWidget);
freqFrame->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
//freqDrawWidget = new FreqDrawWidget(freqFrame);
//freqDrawWidget->setFocusPolicy(Qt::NoFocus);
freqWidgetGL = new FreqWidgetGL(freqFrame);
freqWidgetGL->setFocusPolicy(Qt::NoFocus);
topLeftLayout->addWidget(freqFrame);
*/
QFrame *freqFrame = new QFrame;
freqFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
QVBoxLayout *freqFrameLayout = new QVBoxLayout;
freqWidgetGL = new FreqWidgetGL(NULL);
freqWidgetGL->setWhatsThis("The line represents the musical pitch of the sound. A higher pitch moves up, with note names shown at the left, with octave numbers. "
"The black vertical line shows the current time. This line's position can be moved. "
"Pitch-lines are drawn connected only because they change a small amount over a small time step. "
"Note: This may cause semi-tone note changes appear to be joined. Clicking the background and dragging moves the view. "
"Clicking a pitch-line selects it. Mouse-Wheel scrolls. Shift-Mouse-Wheel zooms");
//freqWidgetGL = new FreqDrawWidget(NULL);
freqFrameLayout->addWidget(freqWidgetGL);
freqFrameLayout->setMargin(0);
freqFrameLayout->setSpacing(0);
freqFrame->setLayout(freqFrameLayout);
topLeftLayout->addWidget(freqFrame);
//Q3BoxLayout *topRightLayout = new Q3VBoxLayout(topLayout);
QVBoxLayout *topRightLayout = new QVBoxLayout();
freqWheelY = new QwtWheel(topWidget);
freqWheelY->setOrientation(Qt::Vertical);
freqWheelY->setWheelWidth(14);
freqWheelY->setRange(1.6, 5.0, 0.001, 1);
//freqWheelY->setValue(3.2);
//view->setZoomFactorY(3.2);
freqWheelY->setValue(view->logZoomY());
QToolTip::add(freqWheelY, "Zoom pitch contour view vertically");
topRightLayout->addSpacing(20);
topRightLayout->addWidget(freqWheelY, 0);
//Create the vertical scrollbar
//vScrollBar = new MyScrollBar(0, toInt((view->topNote()-view->viewHeight())*view->stepY()), 20, toInt(view->viewHeight()*view->stepY()), toInt(view->viewBottom()*view->stepY()), Qt::Vertical, this);
//vScrollBar = new MyScrollBar(0, gdata->topNote()-view->viewHeight(), 20, view->viewHeight(), view->viewBottom(), 20, Qt::Vertical, this);
freqScrollBar = new MyScrollBar(0, gdata->topPitch()-view->viewHeight(), 0.5, view->viewHeight(), 0, 20, Qt::Vertical, topWidget);
freqScrollBar->setValue(gdata->topPitch()-view->viewHeight()-view->viewBottom());
topRightLayout->addWidget(freqScrollBar, 4);
topLayout->addLayout(topRightLayout);
/*
QPushButton *buttonPlusY = new QPushButton("+", topSplitter);
buttonPlusY->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
buttonPlusY->setFixedSize(15, 15);
QToolTip::add(buttonPlusY, "Zoom in vertically");
QPushButton *buttonMinusY = new QPushButton("-", topSplitter);
buttonMinusY->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
buttonMinusY->setFixedSize(15, 15);
QToolTip::add(buttonMinusY, "Zoom out vertically");
*/
//------------bottom half------------------
QWidget *bottomWidget = new QWidget(splitter);
Q3BoxLayout *bottomLayout = new Q3VBoxLayout(bottomWidget);
Q3BoxLayout *bottomTopLayout = new Q3HBoxLayout(bottomLayout);
/*
Q3Grid *amplitudeFrame = new Q3Grid(1, bottomWidget);
amplitudeFrame->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
amplitudeWidget = new AmplitudeWidget(amplitudeFrame);
bottomTopLayout->addWidget(amplitudeFrame);
*/
QFrame *amplitudeFrame = new QFrame;
amplitudeFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
QVBoxLayout *amplitudeFrameLayout = new QVBoxLayout;
//.........这里部分代码省略.........
示例2: appendWidget
void GPConfigDlg::appendWidget(QWidget* parent, CameraWidget* widget)
{
QWidget* newParent = parent;
CameraWidgetType widget_type;
const char* widget_name;
const char* widget_info;
const char* widget_label;
float widget_value_float;
int widget_value_int;
const char* widget_value_string;
gp_widget_get_type(widget, &widget_type);
gp_widget_get_label(widget, &widget_label);
gp_widget_get_info(widget, &widget_info);
gp_widget_get_name(widget, &widget_name);
// gphoto2 doesn't seem to have any standard for i18n
QString whats_this = QString::fromLocal8Bit(widget_info);
// Add this widget to parent
switch (widget_type)
{
case GP_WIDGET_WINDOW:
{
setCaption(widget_label);
break;
}
case GP_WIDGET_SECTION:
{
if (!d->tabWidget)
{
d->tabWidget = new QTabWidget(parent);
parent->layout()->addWidget(d->tabWidget);
}
QWidget* tab = new QWidget(d->tabWidget);
// widgets are to be aligned vertically in the tab
QVBoxLayout* tabLayout = new QVBoxLayout(tab, marginHint(),
spacingHint());
d->tabWidget->insertTab(tab, widget_label);
KVBox* tabContainer = new KVBox(tab);
tabContainer->setSpacing(spacingHint());
tabLayout->addWidget(tabContainer);
newParent = tabContainer;
tabLayout->addStretch();
break;
}
case GP_WIDGET_TEXT:
{
gp_widget_get_value(widget, &widget_value_string);
Q3Grid* grid = new Q3Grid(2, Qt::Horizontal, parent);
parent->layout()->addWidget(grid);
grid->setSpacing(spacingHint());
new QLabel(QString::fromLocal8Bit(widget_label) + ':', grid);
QLineEdit* lineEdit = new QLineEdit(widget_value_string, grid);
d->wmap.insert(widget, lineEdit);
if (!whats_this.isEmpty())
{
grid->setWhatsThis(whats_this);
}
break;
}
case GP_WIDGET_RANGE:
{
float widget_low;
float widget_high;
float widget_increment;
gp_widget_get_range(widget, &widget_low, &widget_high, &widget_increment);
gp_widget_get_value(widget, &widget_value_float);
Q3GroupBox* groupBox = new Q3GroupBox(1, Qt::Horizontal, widget_label, parent);
parent->layout()->addWidget(groupBox);
QSlider* slider = new QSlider(
(int)widget_low,
(int)widget_high,
(int)widget_increment,
(int)widget_value_float,
Qt::Horizontal,
groupBox);
d->wmap.insert(widget, slider);
if (!whats_this.isEmpty())
{
groupBox->setWhatsThis(whats_this);
}
break;
}
case GP_WIDGET_TOGGLE:
{
//.........这里部分代码省略.........