コード例 #1
0
void accountmanagerdialog::on_editButton_clicked()
{
    QList<QListWidgetItem*> selected = ui->listWidget->selectedItems();
    if(selected.isEmpty())
        return;
    QListWidgetItem *thisOne = selected.first();
    Account *acc = getAccount(thisOne);

    AccountDialog *accDiag = new AccountDialog(0,acc);
    accDiag->exec();
}
コード例 #2
0
void accountmanagerdialog::on_addButton_clicked()
{
    AccountDialog *accDiag = new AccountDialog(0);
    switch(accDiag->exec()) {
        case QDialog::Accepted:
        {
            ui->listWidget->addItem(makeListItem(accDiag->account));
            break;
        }
        case QDialog::Rejected:
            return;
    }
}
コード例 #3
0
void MainWindow::add()
{
  AccountDialog *accountdialog = new AccountDialog(m, 1);
  accountdialog->exec();
}
コード例 #4
0
void MainWindow::update()
{
  AccountDialog *accountdialog = new AccountDialog(m, 2);
  accountdialog->exec();
}