Convert rest of source to 4-space indent

This commit is contained in:
Matt Kelly 2014-02-11 11:14:19 -05:00
parent a171df744d
commit 1bc48a7849
146 changed files with 12810 additions and 12810 deletions

View file

@ -12,47 +12,47 @@
#include "deck_loader.h"
DlgLoadDeckFromClipboard::DlgLoadDeckFromClipboard(QWidget *parent)
: QDialog(parent), deckList(0)
: QDialog(parent), deckList(0)
{
contentsEdit = new QPlainTextEdit;
refreshButton = new QPushButton(tr("&Refresh"));
refreshButton->setShortcut(QKeySequence("F5"));
connect(refreshButton, SIGNAL(clicked()), this, SLOT(actRefresh()));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
buttonBox->addButton(refreshButton, QDialogButtonBox::ActionRole);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(actOK()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(contentsEdit);
mainLayout->addWidget(buttonBox);
contentsEdit = new QPlainTextEdit;
refreshButton = new QPushButton(tr("&Refresh"));
refreshButton->setShortcut(QKeySequence("F5"));
connect(refreshButton, SIGNAL(clicked()), this, SLOT(actRefresh()));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
buttonBox->addButton(refreshButton, QDialogButtonBox::ActionRole);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(actOK()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(contentsEdit);
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);
setLayout(mainLayout);
setWindowTitle(tr("Load deck from clipboard"));
resize(500, 500);
actRefresh();
setWindowTitle(tr("Load deck from clipboard"));
resize(500, 500);
actRefresh();
}
void DlgLoadDeckFromClipboard::actRefresh()
{
contentsEdit->setPlainText(QApplication::clipboard()->text());
contentsEdit->setPlainText(QApplication::clipboard()->text());
}
void DlgLoadDeckFromClipboard::actOK()
{
QString buffer = contentsEdit->toPlainText();
QTextStream stream(&buffer);
DeckLoader *l = new DeckLoader;
if (l->loadFromStream_Plain(stream)) {
deckList = l;
accept();
} else {
QMessageBox::critical(this, tr("Error"), tr("Invalid deck list."));
delete l;
}
QString buffer = contentsEdit->toPlainText();
QTextStream stream(&buffer);
DeckLoader *l = new DeckLoader;
if (l->loadFromStream_Plain(stream)) {
deckList = l;
accept();
} else {
QMessageBox::critical(this, tr("Error"), tr("Invalid deck list."));
delete l;
}
}