本文整理汇总了C++中KVBox::setMargin方法的典型用法代码示例。如果您正苦于以下问题:C++ KVBox::setMargin方法的具体用法?C++ KVBox::setMargin怎么用?C++ KVBox::setMargin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KVBox
的用法示例。
在下文中一共展示了KVBox::setMargin方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: config
PreProcessingPage::PreProcessingPage(Manager* const mngr, KAssistantDialog* const dlg)
: KPWizardPage(dlg, i18n("<b>Pre-Processing Images</b>")),
d(new PreProcessingPagePriv)
{
d->mngr = mngr;
d->progressTimer = new QTimer(this);
KVBox* vbox = new KVBox(this);
d->title = new QLabel(vbox);
d->title->setWordWrap(true);
d->title->setOpenExternalLinks(true);
KConfig config("kipirc");
KConfigGroup group = config.group(QString("Panorama Settings"));
d->celesteCheckBox = new QCheckBox(i18n("Detect moving skies"), vbox);
d->celesteCheckBox->setChecked(group.readEntry("Celeste", false));
d->celesteCheckBox->setToolTip(i18n("Automatic detection of clouds to prevent wrong keypoints matching "
"between images due to moving clouds."));
d->celesteCheckBox->setWhatsThis(i18n("<b>Detect moving skies</b>: During the control points selection and matching, "
"this option discards any points that are associated to a possible cloud. This "
"is useful to prevent moving clouds from altering the control points matching "
"process."));
QLabel* space1 = new QLabel(vbox);
KHBox* hbox = new KHBox(vbox);
d->detailsBtn = new QPushButton(hbox);
d->detailsBtn->setText(i18n("Details..."));
d->detailsBtn->hide();
QLabel* space2 = new QLabel(hbox);
hbox->setStretchFactor(space2, 10);
QLabel* space3 = new QLabel(vbox);
d->progressLabel = new QLabel(vbox);
d->progressLabel->setAlignment(Qt::AlignCenter);
QLabel* space4 = new QLabel(vbox);
vbox->setStretchFactor(space1, 2);
vbox->setStretchFactor(space3, 2);
vbox->setStretchFactor(space4, 10);
vbox->setSpacing(KDialog::spacingHint());
vbox->setMargin(KDialog::spacingHint());
setPageWidget(vbox);
resetTitle();
QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_panorama/pics/assistant-preprocessing.png");
setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation));
// connect(d->mngr->thread(), SIGNAL(starting(KIPIPanoramaPlugin::ActionData)),
// this, SLOT(slotAction(KIPIPanoramaPlugin::ActionData)));
connect(d->progressTimer, SIGNAL(timeout()),
this, SLOT(slotProgressTimerDone()));
connect(d->detailsBtn, SIGNAL(clicked()),
this, SLOT(slotShowDetails()));
}
示例2: QToolButton
VolumePopupButton::VolumePopupButton( QWidget * parent, PlayerManager *mgr ) :
QToolButton( parent ),
m_prevVolume(0.0),
m_curVolume(0.0),
player(mgr)
{
//create the volume popup
m_volumeMenu = new QMenu( this );
KVBox *mainBox = new KVBox( this );
m_volumeLabel= new QLabel( mainBox );
m_volumeLabel->setAlignment( Qt::AlignHCenter );
KHBox *sliderBox = new KHBox( mainBox );
m_volumeSlider = new VolumeSlider( 100, sliderBox, false );
m_volumeSlider->setFixedHeight( 170 );
mainBox->setMargin( 0 );
mainBox->setSpacing( 0 );
sliderBox->setSpacing( 0 );
sliderBox->setMargin( 0 );
mainBox->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
sliderBox->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed );
QWidgetAction *sliderActionWidget = new QWidgetAction( this );
sliderActionWidget->setDefaultWidget( mainBox );
// volumeChanged is a customSignal, is not emited by setValue()
connect( m_volumeSlider, SIGNAL(volumeChanged(float)), player, SLOT(setVolume(float)) );
QToolBar *muteBar = new QToolBar( QString(), mainBox );
muteBar->setContentsMargins( 0, 0, 0, 0 );
muteBar->setIconSize( QSize( 16, 16 ) );
// our popup's mute-toggle button
m_muteAction = new QAction( KIcon( "audio-volume-muted" ), QString(), muteBar );
m_muteAction->setToolTip( i18n( "Mute/Unmute" ) );
connect( m_muteAction, SIGNAL(triggered(bool)), this, SLOT(slotToggleMute(bool)) );
connect( player, SIGNAL(mutedChanged(bool)), this, SLOT(slotMuteStateChanged(bool)) );
m_volumeMenu->addAction( sliderActionWidget );
muteBar->addAction( m_muteAction );
/* set icon and label to match create state of AudioOutput, as the
* desired volume value is not available yet (because the player
* object is not set up yet.) Someone must call PlayerManager::setVolume()
* later.
*/
slotVolumeChanged( 1.0 );
// let player notify us when volume changes
connect( player, SIGNAL(volumeChanged(float)), this, SLOT(slotVolumeChanged(float)) );
}
示例3: config
PreProcessingPage::PreProcessingPage(Manager* const mngr, KAssistantDialog* const dlg)
: KPWizardPage(dlg, i18n("<b>Pre-Processing Bracketed Images</b>")),
d(new PreProcessingPagePriv)
{
d->mngr = mngr;
d->progressTimer = new QTimer(this);
KVBox *vbox = new KVBox(this);
d->title = new QLabel(vbox);
d->title->setWordWrap(true);
d->title->setOpenExternalLinks(true);
d->alignCheckBox = new QCheckBox(i18n("Align bracketed images"), vbox);
KConfig config("kipirc");
KConfigGroup group = config.group(QString("ExpoBlending Settings"));
d->alignCheckBox->setChecked(group.readEntry("Auto Alignment", true));
QLabel* space1 = new QLabel(vbox);
KHBox* hbox = new KHBox(vbox);
d->detailsBtn = new QPushButton(hbox);
d->detailsBtn->setText(i18n("Details..."));
d->detailsBtn->hide();
QLabel* space2 = new QLabel(hbox);
hbox->setStretchFactor(space2, 10);
QLabel* space3 = new QLabel(vbox);
d->progressLabel = new QLabel(vbox);
d->progressLabel->setAlignment(Qt::AlignCenter);
QLabel* space4 = new QLabel(vbox);
vbox->setStretchFactor(space1, 2);
vbox->setStretchFactor(space3, 2);
vbox->setStretchFactor(space4, 10);
vbox->setSpacing(KDialog::spacingHint());
vbox->setMargin(KDialog::spacingHint());
setPageWidget(vbox);
resetTitle();
QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_expoblending/pics/assistant-preprocessing.png");
setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation));
connect(d->mngr->thread(), SIGNAL(starting(KIPIExpoBlendingPlugin::ActionData)),
this, SLOT(slotAction(KIPIExpoBlendingPlugin::ActionData)));
connect(d->progressTimer, SIGNAL(timeout()),
this, SLOT(slotProgressTimerDone()));
connect(d->detailsBtn, SIGNAL(clicked()),
this, SLOT(slotShowDetails()));
}
示例4: config
OptimizePage::OptimizePage(Manager* const mngr, KAssistantDialog* const dlg)
: KPWizardPage(dlg, i18n("<b>Optimization</b>")),
d(new OptimizePagePriv)
{
d->mngr = mngr;
KVBox* vbox = new KVBox(this);
d->progressTimer = new QTimer(this);
d->title = new QLabel(vbox);
d->title->setOpenExternalLinks(true);
d->title->setWordWrap(true);
KConfig config("kipirc");
KConfigGroup group = config.group(QString("Panorama Settings"));
d->horizonCheckbox = new QCheckBox(i18n("Level horizon"), vbox);
d->horizonCheckbox->setChecked(group.readEntry("Horizon", true));
d->horizonCheckbox->setToolTip(i18n("Detect the horizon and adapt the project to make it horizontal."));
d->horizonCheckbox->setWhatsThis(i18n("<b>Level horizon</b>: Detect the horizon and adapt the projection so that "
"the detected horizon is an horizontal line in the final panorama"));
d->projectionAndSizeCheckbox = new QCheckBox(i18n("Automatic projection and crop"), vbox);
d->projectionAndSizeCheckbox->setChecked(group.readEntry("Output Projection And Size", true));
d->projectionAndSizeCheckbox->setToolTip(i18n("Adapt the projection of the panorama and the cropping on the resulting "
"projection so that every photo fits in the resulting panorama."));
d->projectionAndSizeCheckbox->setWhatsThis(i18n("<b>Automatic projection and crop</b>: Automatically adapt the projection "
"and the crop of the panorama to get every photos into the panorama."));
d->preprocessResults = new QLabel(vbox);
QLabel* space1 = new QLabel(vbox);
vbox->setStretchFactor(space1, 2);
KHBox* hbox = new KHBox(vbox);
d->detailsBtn = new QPushButton(hbox);
d->detailsBtn->setText(i18n("Details..."));
d->detailsBtn->hide();
QLabel* space2 = new QLabel(hbox);
hbox->setStretchFactor(space2, 10);
QLabel* space3 = new QLabel(vbox);
vbox->setStretchFactor(space3, 2);
d->progressLabel = new QLabel(vbox);
d->progressLabel->setAlignment(Qt::AlignCenter);
QLabel* space4 = new QLabel(vbox);
vbox->setStretchFactor(space4, 10);
vbox->setSpacing(KDialog::spacingHint());
vbox->setMargin(KDialog::spacingHint());
setPageWidget(vbox);
resetTitle();
QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_panorama/pics/assistant-hugin.png");
setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation));
// connect(d->mngr->thread(), SIGNAL(starting(KIPIPanoramaPlugin::ActionData)),
// this, SLOT(slotAction(KIPIPanoramaPlugin::ActionData)));
connect(d->progressTimer, SIGNAL(timeout()),
this, SLOT(slotProgressTimerDone()));
connect(d->detailsBtn, SIGNAL(clicked()),
this, SLOT(slotShowDetails()));
}