WaypointDialog::WaypointDialog(int wp,QWidget *parent) : QDialog(parent),ui(new Ui::WaypointDialog) { // first thing - copy the old data. waypoint=wp; double *d = wpGet(wp); oldData = new double[wpGetNumFields()]; for(int i=0;i<wpGetNumFields();i++){ oldData[i]=d[i]; } connect(this,SIGNAL(rejected()),this,SLOT(onReject())); model = new WaypointModel(wp); // make the parent redraw if the data changes connect(model,SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), parent, SLOT(update())); ui->setupUi(this); ui->tableView->setModel(model); // make the table fill its space ui->tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); // connect(ui->saveButton,SIGNAL(clicked(bool)),this,SLOT(onSave())); // connect(ui->loadButton,SIGNAL(clicked(bool)),this,SLOT(onLoad())); }
SimplePasswordWidget::SimplePasswordWidget(Account *account, SimplePasswordDialog *parent) : ui(new Ui::SimplePasswordWidget) { ui->setupUi(this); ui->label->setText(ui->label->text().arg(account->id(), account->protocol()->id())); connect(this, SIGNAL(accepted()), this, SLOT(onAccept())); connect(this, SIGNAL(rejected()), this, SLOT(onReject())); m_account = account; m_parent = parent; }
BOOL QueryConnectionDialog::onCommand(UINT controlID, UINT notificationID) { switch (controlID) { case IDC_ACCEPT_BUTTON: onAccept(); break; case IDC_REJECT_BUTTON: onReject(); break; } return TRUE; }
void QueryConnectionDialog::onTimer() { if (m_timeout == 0) { KillTimer(m_ctrlThis.getWindow(), 0); if (m_acceptByDefault) { onAccept(); } else { onReject(); } } else { m_timeout--; updateTimeoutLabel(); } }
RendererDialog::RendererDialog( intf_thread_t *_p_intf ) : QVLCDialog( (QWidget*)_p_intf->p_sys->p_mi, _p_intf ) , p_rd( NULL ) , b_rd_started( false ) { setWindowTitle( qtr( "Renderer Output" ) ); setWindowRole( "vlc-renderer" ); /* Build Ui */ ui.setupUi( this ); CONNECT( ui.buttonBox, accepted(), this, accept() ); CONNECT( ui.buttonBox, rejected(), this, onReject() ); CONNECT( ui.receiversListWidget, itemDoubleClicked(QListWidgetItem*), this, accept()); QVLCTools::restoreWidgetPosition( p_intf, "Renderer", this, QSize( 400 , 440 ) ); }