本文整理汇总了C++中slotCancel函数的典型用法代码示例。如果您正苦于以下问题:C++ slotCancel函数的具体用法?C++ slotCancel怎么用?C++ slotCancel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了slotCancel函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDockWidget
ToolBoxWidget::ToolBoxWidget(QWidget *parent) :
QDockWidget(parent),
ui(new Ui::ToolBoxWidget)
{
ui->setupUi(this);
emptyPage = new QWidget; //index 0
this-ui->stackedWidget->addWidget(emptyPage);
createBlockW = new CreateBlockWidget; //index 1
this->ui->stackedWidget->addWidget(createBlockW);
moveVerticesW = new MoveVerticesWidget; //index 2
this->ui->stackedWidget->addWidget(moveVerticesW);
setBCsW = new SetBCsWidget; //index 3
this->ui->stackedWidget->addWidget(setBCsW);
edgePropsW = new EdgePropsWidget; //index 4
this->ui->stackedWidget->addWidget(edgePropsW);
this->ui->stackedWidget->setCurrentIndex(1);
connect(createBlockW,SIGNAL(cancel()),this,SLOT(slotCancel()));
connect(setBCsW,SIGNAL(done()),this,SLOT(slotCancel()));
connect(moveVerticesW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString)));
connect(moveVerticesW,SIGNAL(moveDone()),this,SLOT(slotCancel()));
connect(createBlockW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString)));
connect(setBCsW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString)));
connect(edgePropsW,SIGNAL(cancel()),this,SLOT(slotCancel()));
connect(edgePropsW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString)));
}
示例2: timerTimeout
void KTimerDialog::slotInternalTimeout()
{
emit timerTimeout();
switch(buttonOnTimeout)
{
case Help:
slotHelp();
break;
case Default:
slotDefault();
break;
case Ok:
slotOk();
break;
case Apply:
applyPressed();
break;
case Try:
slotTry();
break;
case Cancel:
slotCancel();
break;
case Close:
slotClose();
break;
/*case User1:
slotUser1();
break;
case User2:
slotUser2();
break;*/
case User3:
slotUser3();
break;
case No:
slotNo();
break;
case Yes:
slotCancel();
break;
case Details:
slotDetails();
break;
case Filler:
case Stretch:
kdDebug() << "Cannot execute button code " << buttonOnTimeout << endl;
break;
}
}
示例3: QDialog
K3b::DataMultisessionImportDialog::DataMultisessionImportDialog( QWidget* parent )
: QDialog( parent),
d( new Private() )
{
setModal(true);
setWindowTitle(i18n("Session Import"));
QVBoxLayout* layout = new QVBoxLayout( this );
QLabel* label = new QLabel( i18n( "Please select a session to import." ), this );
d->sessionView = new QTreeWidget( this );
d->sessionView->setHeaderHidden( true );
d->sessionView->setItemsExpandable( false );
d->sessionView->setRootIsDecorated( false );
QDialogButtonBox* buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this );
d->okButton = buttonBox->button( QDialogButtonBox::Ok );
connect( buttonBox, SIGNAL(accepted()), SLOT(accept()) );
connect( buttonBox, SIGNAL(rejected()), SLOT(reject()) );
layout->addWidget( label );
layout->addWidget( d->sessionView );
layout->addWidget( buttonBox );
connect( k3bappcore->mediaCache(), SIGNAL(mediumChanged(K3b::Device::Device*)),
this, SLOT(updateMedia()) );
connect( d->sessionView, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)),
this, SLOT(slotSelectionChanged()) );
connect( d->sessionView, SIGNAL(itemActivated(QTreeWidgetItem*,int)), SIGNAL(okClicked()) );
connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
connect(this,SIGNAL(cancelClicked()),this,SLOT(slotCancel()));
}
示例4: QDialog
KrCalcSpaceDialog::KrCalcSpaceDialog(QWidget *parent, KrPanel * panel, const QStringList & items, bool autoclose) :
QDialog(parent), m_autoClose(autoclose), m_canceled(false),
m_timerCounter(0), m_items(items), m_view(panel->view)
{
setWindowTitle(i18n("Calculate Occupied Space"));
setWindowModality(Qt::WindowModal);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
m_thread = new CalcThread(panel->virtualPath(), items);
m_pollTimer = new QTimer(this);
m_label = new QLabel("", this);
mainLayout->addWidget(m_label);
showResult(); // fill m_label with something useful
mainLayout->addStretch(10);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
mainLayout->addWidget(buttonBox);
okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
// the dialog: The Ok button is hidden until it is needed
okButton->setVisible(false);
cancelButton = buttonBox->button(QDialogButtonBox::Cancel);
connect(buttonBox, SIGNAL(accepted()), SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), SLOT(slotCancel()));
}
示例5: DWizardPage
PanoPreviewPage::PanoPreviewPage(PanoManager* const mngr, QWizard* const dlg)
: DWizardPage(dlg, i18nc("@title:window", "<b>Preview and Post-Processing</b>")),
d(new Private(mngr))
{
d->dlg = dlg;
DVBox* const vbox = new DVBox(this);
d->title = new QLabel(vbox);
d->title->setOpenExternalLinks(true);
d->title->setWordWrap(true);
d->previewWidget = new DPreviewManager(vbox);
d->previewWidget->setButtonText(i18nc("@action:button", "Details..."));
d->postProcessing = new DHistoryView(vbox);
d->progressBar = new DProgressWdg(vbox);
setPageWidget(vbox);
QPixmap leftPix(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/assistant-hugin.png")));
setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation));
connect(d->progressBar, SIGNAL(signalProgressCanceled()),
this, SLOT(slotCancel()));
}
示例6: void
walletconfiginput::walletconfiginput( QWidget * parent,
std::function< void( const QString&,const QString&,const QString& ) > p,
std::function< void() > q ) :
QDialog( parent ),m_ui( new Ui::walletconfiginput ),m_add( std::move( p ) ),m_cancel( std::move( q ) )
{
m_ui->setupUi( this ) ;
this->setFixedSize( this->size() ) ;
if( parent ){
this->setFont( parent->font() ) ;
}
m_ui->lineEditVolumeID->setEnabled( true ) ;
m_ui->lineEditKey->setEchoMode( QLineEdit::Password ) ;
m_ui->lineEditRepeatKey->setEchoMode( QLineEdit::Password ) ;
connect( m_ui->pushButtonAdd,SIGNAL( clicked() ),this,SLOT( pbAdd() ) ) ;
connect( m_ui->pushButtonCancel,SIGNAL( clicked() ),this,SLOT( slotCancel() ) ) ;
connect( m_ui->pushButtonImageFile,SIGNAL( clicked() ),this,SLOT( pbImageFilePath() ) ) ;
connect( m_ui->pushButtonVolume,SIGNAL( clicked() ),this,SLOT( pbVolumePath() ) ) ;
m_ui->pushButtonImageFile->setIcon( QIcon( ":/file.png" ) ) ;
m_ui->pushButtonVolume->setIcon( QIcon( ":/partition.png" ) ) ;
this->installEventFilter( this ) ;
this->show() ;
}
示例7: KDialog
AddCatDialog::AddCatDialog( KStars *_ks )
: KDialog( ( QWidget* )_ks ), ks( _ks )
{
QDir::setCurrent( QDir::homePath() );
acd = new AddCatDialogUI(this);
setMainWidget(acd);
setCaption( i18n( "Import Catalog" ) );
setButtons( KDialog::Help|KDialog::Ok|KDialog::Cancel );
connect( acd->DataURL->lineEdit(), SIGNAL( lostFocus() ), this, SLOT( slotShowDataFile() ) );
connect( acd->DataURL, SIGNAL( urlSelected( const KUrl & ) ),
this, SLOT( slotShowDataFile() ) );
connect( acd->PreviewButton, SIGNAL( clicked() ), this, SLOT( slotPreviewCatalog() ) );
connect( this, SIGNAL( okClicked() ), this, SLOT( slotCreateCatalog() ) );
// connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
connect(this,SIGNAL(cancelClicked()),this,SLOT(slotCancel()));
connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));
acd->FieldList->addItem( i18n( "ID Number" ) );
acd->FieldList->addItem( i18n( "Right Ascension" ) );
acd->FieldList->addItem( i18n( "Declination" ) );
acd->FieldList->addItem( i18n( "Object Type" ) );
acd->FieldPool->addItem( i18n( "Common Name" ) );
acd->FieldPool->addItem( i18n( "Magnitude" ) );
acd->FieldPool->addItem( i18n( "Flux" ) );
acd->FieldPool->addItem( i18n( "Major Axis" ) );
acd->FieldPool->addItem( i18n( "Minor Axis" ) );
acd->FieldPool->addItem( i18n( "Position Angle" ) );
acd->FieldPool->addItem( i18n( "Ignore" ) );
}
示例8: if
void Dialog::setProgressDialogVisible(bool b)
{
if (!b)
{
d->deleteProgressDialog(true);
}
else if(d->progressDialogTimeout >= 0)
{
if (d->progressDialog)
{
return;
}
d->progressDialog = new KProgressDialog(this, i18nc("@title:window", "Check Spelling"),
i18nc("progress label", "Spell checking in progress..."));
d->progressDialog->setModal(true);
d->progressDialog->setAutoClose(false);
d->progressDialog->setAutoReset(false);
// create an 'indefinite' progress box as we currently cannot get progress feedback from
// the speller
d->progressDialog->progressBar()->reset();
d->progressDialog->progressBar()->setRange(0, 0);
d->progressDialog->progressBar()->setValue(0);
connect(d->progressDialog, SIGNAL(cancelClicked()), this, SLOT(slotCancel()));
d->progressDialog->setMinimumDuration(d->progressDialogTimeout);
}
}
示例9: QDialog
KDialogBase::KDialogBase( const QString & /*caption*/, int /*buttonMask*/,
ButtonCode /*defaultButton*/, ButtonCode /*escapeButton*/,
QWidget *parent, const char *name,
bool modal, bool /*separator*/,
const QString &user1,
const QString &user2,
const QString &/*user3*/ ) // third button left out because
// it is only used by KCookieWin, which activates the cookie-detail button, which
// is too large for small displays, anyway
: QDialog( parent, name, modal )
{
m_mainLayout = new QVBoxLayout( this );
m_buttonLayout = new QHBoxLayout( m_mainLayout );
m_okButton = new QPushButton( user1.isEmpty() ? i18n( "Yes" ) : user1 , this );
m_cancelButton = new QPushButton( user2.isEmpty() ? i18n( "No" ) : user2, this );
m_buttonLayout->addStretch();
m_buttonLayout->addWidget( m_okButton );
m_buttonLayout->addWidget( m_cancelButton );
m_buttonLayout->addStretch();
connect( m_okButton, SIGNAL( clicked() ),
this, SLOT( slotOk() ) );
connect( m_cancelButton, SIGNAL( clicked() ),
this, SLOT( slotCancel() ) );
m_mainWidget = 0;
}
示例10: KPageDialog
KomparePrefDlg::KomparePrefDlg( ViewSettings* viewSets, DiffSettings* diffSets ) : KPageDialog( 0 )
{
setFaceType( KPageDialog::List );
setWindowTitle( i18n( "Preferences" ) );
setButtons( Help|Default|Ok|Apply|Cancel );
setDefaultButton( Ok );
setModal( true );
showButtonSeparator( true );
// ok i need some stuff in that pref dlg...
//setIconListAllVisible(true);
m_viewPage = new ViewPage();
KPageWidgetItem *item = addPage( m_viewPage, i18n( "View" ) );
item->setIcon( KIcon( "preferences-desktop-theme" ) );
item->setHeader( i18n( "View Settings" ) );
m_viewPage->setSettings( viewSets );
m_diffPage = new DiffPage();
item = addPage( m_diffPage, i18n( "Diff" ) );
item->setIcon( KIcon( "text-x-patch" ) );
item->setHeader( i18n( "Diff Settings" ) );
m_diffPage->setSettings( diffSets );
// frame = addVBoxPage( i18n( "" ), i18n( "" ), UserIcon( "" ) );
connect( this, SIGNAL(defaultClicked()), SLOT(slotDefault()) );
connect( this, SIGNAL(helpClicked()), SLOT(slotHelp()) );
connect( this, SIGNAL(applyClicked()), SLOT(slotApply()) );
connect( this, SIGNAL(okClicked()), SLOT(slotOk()) );
connect( this, SIGNAL(cancelClicked()), SLOT(slotCancel()) );
adjustSize();
}
示例11: Q_UNUSED
void CameraController::slotUploadFailed(const QString& folder, const QString& file, const QString& src)
{
Q_UNUSED(folder);
Q_UNUSED(src);
sendLogMsg(i18n("Failed to upload <filename>%1</filename>", file), DHistoryView::ErrorEntry);
if (!d->canceled)
{
if (queueIsEmpty())
{
KMessageBox::error(d->parent, i18n("Failed to upload file <filename>%1</filename>.", file));
}
else
{
const QString msg = i18n("Failed to upload file <filename>%1</filename>. Do you want to continue?", file);
int result = KMessageBox::warningContinueCancel(d->parent, msg);
if (result != KMessageBox::Continue)
{
slotCancel();
}
}
}
}
示例12: ProgressItem
MaintenanceTool::MaintenanceTool(const QString& id, ProgressItem* const parent)
: ProgressItem(parent, id, QString(), QString(), true, true),
d(new Private)
{
connect(this, SIGNAL(progressItemCanceled(QString)),
this, SLOT(slotCancel()));
}
示例13: dir
void ExportSymlinks::execute()
{
// test the destination directory
if (m_destinationDir->isEmpty()) {
tracer->error(__func__, "The specified 'destinationDir' is null or empty!");
return;
}
QDir dir(*m_destinationDir);
if (!dir.exists()) {
tracer->error(__func__, "The specified 'destinationDir' does not exist or is not a directory!");
return;
}
// test the files to export
if (!m_sourceFiles || m_sourceFiles->isEmpty()) {
tracer->info(__func__, "No files to export!");
return;
}
// setup progress dialog
m_progressDialog = new KProgressDialog(m_parent, "exportSymlinksProgressDialog", i18n("Exporting symbolic links"), i18n("Initializing export..."), true);
m_progressDialog->progressBar()->setTotalSteps(m_sourceFiles->count());
m_progressDialog->setAllowCancel(true);
connect(m_progressDialog, SIGNAL(cancelClicked()), this, SLOT(slotCancel()));
m_progressDialog->show();
// do the job
doExport();
}
示例14: QDialog
CloseMessageBox::CloseMessageBox(const QString& Caption, const QString& Text,
QWidget *parent, const char *name)
: QDialog(parent, name)
// must not be "WDestructiveClose" !!!!!
{
setCaption(Caption);
all = new Q3VBoxLayout(this);
all->setSpacing(5);
QLabel *l = new QLabel(Text, this);
l->setAlignment(Qt::AlignVCenter|Qt::AlignHCenter);
l->setMargin(5);
all->addWidget(l);
Q3HBox *Butts = new Q3HBox(this);
// Butts->setSpacing(5);
all->addWidget(Butts);
QPushButton *Save = new QPushButton(tr("Save"), Butts);
connect(Save, SIGNAL(clicked()), SLOT(slotSave()));
QPushButton *SaveAll = new QPushButton(tr("Save all"), Butts);
connect(SaveAll, SIGNAL(clicked()), SLOT(slotSaveAll()));
QPushButton *Discard = new QPushButton(tr("Discard"), Butts);
connect(Discard, SIGNAL(clicked()), SLOT(slotDiscard()));
QPushButton *DiscardAll = new QPushButton(tr("Discard all"), Butts);
connect(DiscardAll, SIGNAL(clicked()), SLOT(slotDiscardAll()));
QPushButton *Cancel = new QPushButton(tr("Cancel"), Butts);
connect(Cancel, SIGNAL(clicked()), SLOT(slotCancel()));
}
示例15: connect
void EditorTool::setToolSettings(EditorToolSettings* const settings)
{
d->settings = settings;
d->settings->setToolIcon(toolIcon());
d->settings->setToolName(toolName());
connect(d->settings, SIGNAL(signalOkClicked()),
this, SLOT(slotOk()));
connect(d->settings, SIGNAL(signalCancelClicked()),
this, SLOT(slotCancel()));
connect(d->settings, SIGNAL(signalDefaultClicked()),
this, SLOT(slotResetSettings()));
connect(d->settings, SIGNAL(signalSaveAsClicked()),
this, SLOT(slotSaveAsSettings()));
connect(d->settings, SIGNAL(signalLoadClicked()),
this, SLOT(slotLoadSettings()));
connect(d->settings, SIGNAL(signalTryClicked()),
this, SLOT(slotPreview()));
connect(d->settings, SIGNAL(signalChannelChanged()),
this, SLOT(slotChannelChanged()));
connect(d->settings, SIGNAL(signalScaleChanged()),
this, SLOT(slotScaleChanged()));
// Will be unblocked in slotInit()
// This will prevent signals emit during tool init.
d->settings->blockSignals(true);
}