Added comic vine API key input dialog, YACReader's api key will not longer be used. The user will be responsible for getting his/her own API key.

This commit is contained in:
Luis Ángel San Martín
2014-10-06 17:38:11 +02:00
parent 01cf4e40bb
commit 529a3b36e5
12 changed files with 195 additions and 22 deletions

View File

@ -3,6 +3,7 @@
#include "yacreader_flow_gl.h"
#include "yacreader_flow_config_widget.h"
#include "yacreader_gl_flow_config_widget.h"
#include "api_key_dialog.h"
#include <QVBoxLayout>
#include <QHBoxLayout>
@ -42,12 +43,22 @@ OptionsDialog::OptionsDialog(QWidget * parent)
sw->hide();
QVBoxLayout * apiKeyLayout = new QVBoxLayout();
QPushButton * apiKeyButton = new QPushButton(tr("Edit Comic Vine API key"));
apiKeyLayout->addWidget(apiKeyButton);
QGroupBox * apiKeyBox = new QGroupBox(tr("Comic Vine API key"));
apiKeyBox->setLayout(apiKeyLayout);
connect(apiKeyButton,SIGNAL(clicked()),this,SLOT(editApiKey()));
QWidget * comicFlowW = new QWidget;
comicFlowW->setLayout(flowLayout);
QWidget * generalW = new QWidget;
generalW->setLayout(generalLayout);
generalLayout->addWidget(shortcutsBox);
generalLayout->addWidget(apiKeyBox);
generalLayout->addStretch();
tabWidget->addTab(comicFlowW,tr("Comic Flow"));
@ -65,5 +76,11 @@ OptionsDialog::OptionsDialog(QWidget * parent)
}
void OptionsDialog::editApiKey()
{
ApiKeyDialog d;
d.exec();
}