mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 13:04:28 -04:00
??
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
HEADERS += \
|
HEADERS += \
|
||||||
comic_vine/comic_vine_dialog.h \
|
comic_vine/comic_vine_dialog.h \
|
||||||
comic_vine/comic_vine_client.h \
|
comic_vine/comic_vine_client.h \
|
||||||
comic_vine/scrapper_lineedit.h \
|
comic_vine/scraper_lineedit.h \
|
||||||
comic_vine/title_header.h \
|
comic_vine/title_header.h \
|
||||||
comic_vine/series_question.h \
|
comic_vine/series_question.h \
|
||||||
comic_vine/search_single_comic.h \
|
comic_vine/search_single_comic.h \
|
||||||
@ -13,7 +13,7 @@ HEADERS += \
|
|||||||
comic_vine/model/comics_model.h \
|
comic_vine/model/comics_model.h \
|
||||||
comic_vine/model/json_model.h \
|
comic_vine/model/json_model.h \
|
||||||
comic_vine/model/response_parser.h \
|
comic_vine/model/response_parser.h \
|
||||||
comic_vine/scrapper_tableview.h \
|
comic_vine/scraper_tableview.h \
|
||||||
comic_vine/sort_volume_comics.h \
|
comic_vine/sort_volume_comics.h \
|
||||||
comic_vine/model/local_comic_list_model.h \
|
comic_vine/model/local_comic_list_model.h \
|
||||||
comic_vine/model/volume_comics_model.h
|
comic_vine/model/volume_comics_model.h
|
||||||
@ -21,7 +21,7 @@ HEADERS += \
|
|||||||
SOURCES += \
|
SOURCES += \
|
||||||
comic_vine/comic_vine_dialog.cpp \
|
comic_vine/comic_vine_dialog.cpp \
|
||||||
comic_vine/comic_vine_client.cpp \
|
comic_vine/comic_vine_client.cpp \
|
||||||
comic_vine/scrapper_lineedit.cpp \
|
comic_vine/scraper_lineedit.cpp \
|
||||||
comic_vine/title_header.cpp \
|
comic_vine/title_header.cpp \
|
||||||
comic_vine/series_question.cpp \
|
comic_vine/series_question.cpp \
|
||||||
comic_vine/search_single_comic.cpp \
|
comic_vine/search_single_comic.cpp \
|
||||||
@ -32,7 +32,7 @@ SOURCES += \
|
|||||||
comic_vine/model/comics_model.cpp \
|
comic_vine/model/comics_model.cpp \
|
||||||
comic_vine/model/json_model.cpp \
|
comic_vine/model/json_model.cpp \
|
||||||
comic_vine/model/response_parser.cpp \
|
comic_vine/model/response_parser.cpp \
|
||||||
comic_vine/scrapper_tableview.cpp \
|
comic_vine/scraper_tableview.cpp \
|
||||||
comic_vine/sort_volume_comics.cpp \
|
comic_vine/sort_volume_comics.cpp \
|
||||||
comic_vine/model/local_comic_list_model.cpp \
|
comic_vine/model/local_comic_list_model.cpp \
|
||||||
comic_vine/model/volume_comics_model.cpp
|
comic_vine/model/volume_comics_model.cpp
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "yacreader_busy_widget.h"
|
#include "yacreader_busy_widget.h"
|
||||||
#include "comic_vine_client.h"
|
#include "comic_vine_client.h"
|
||||||
#include "scrapper_lineedit.h"
|
#include "scraper_lineedit.h"
|
||||||
#include "title_header.h"
|
#include "title_header.h"
|
||||||
#include "series_question.h"
|
#include "series_question.h"
|
||||||
#include "search_single_comic.h"
|
#include "search_single_comic.h"
|
||||||
|
@ -50,14 +50,14 @@ protected slots:
|
|||||||
void showSortVolumeComics(const QString & json);
|
void showSortVolumeComics(const QString & json);
|
||||||
private:
|
private:
|
||||||
|
|
||||||
enum ScrapperMode
|
enum ScraperMode
|
||||||
{
|
{
|
||||||
SingleComic, //the scrapper has been opened for a single comic
|
SingleComic, //the scraper has been opened for a single comic
|
||||||
Volume, //the scrapper is trying to get comics info for a whole volume
|
Volume, //the scraper is trying to get comics info for a whole volume
|
||||||
SingleComicInList //the scrapper has been opened for a list of unrelated comics
|
SingleComicInList //the scraper has been opened for a list of unrelated comics
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ScrapperStatus
|
enum ScraperStatus
|
||||||
{
|
{
|
||||||
AutoSearching,
|
AutoSearching,
|
||||||
AskingForInfo,
|
AskingForInfo,
|
||||||
@ -67,8 +67,8 @@ private:
|
|||||||
SearchingVolume
|
SearchingVolume
|
||||||
};
|
};
|
||||||
|
|
||||||
ScrapperMode mode;
|
ScraperMode mode;
|
||||||
ScrapperStatus status;
|
ScraperStatus status;
|
||||||
|
|
||||||
int currentIndex;
|
int currentIndex;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "scrapper_lineedit.h"
|
#include "scraper_lineedit.h"
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
||||||
ScrapperLineEdit::ScrapperLineEdit(const QString & title, QWidget * widget)
|
ScraperLineEdit::ScraperLineEdit(const QString & title, QWidget * widget)
|
||||||
:QLineEdit(widget)
|
:QLineEdit(widget)
|
||||||
{
|
{
|
||||||
titleLabel = new QLabel(title,this);
|
titleLabel = new QLabel(title,this);
|
||||||
@ -14,7 +14,7 @@ ScrapperLineEdit::ScrapperLineEdit(const QString & title, QWidget * widget)
|
|||||||
setFixedHeight(22);
|
setFixedHeight(22);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScrapperLineEdit::resizeEvent(QResizeEvent *)
|
void ScraperLineEdit::resizeEvent(QResizeEvent *)
|
||||||
{
|
{
|
||||||
QSize szl = titleLabel->sizeHint();
|
QSize szl = titleLabel->sizeHint();
|
||||||
titleLabel->move(6,(rect().bottom() + 1 - szl.height())/2);
|
titleLabel->move(6,(rect().bottom() + 1 - szl.height())/2);
|
@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
class QLabel;
|
class QLabel;
|
||||||
|
|
||||||
class ScrapperLineEdit : public QLineEdit
|
class ScraperLineEdit : public QLineEdit
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ScrapperLineEdit(const QString & title, QWidget * widget = 0);
|
ScraperLineEdit(const QString & title, QWidget * widget = 0);
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *);
|
void resizeEvent(QResizeEvent *);
|
||||||
private:
|
private:
|
@ -1,8 +1,8 @@
|
|||||||
#include "scrapper_tableview.h"
|
#include "scraper_tableview.h"
|
||||||
|
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
|
||||||
ScrapperTableView::ScrapperTableView(QWidget *parent) :
|
ScraperTableView::ScraperTableView(QWidget *parent) :
|
||||||
QTableView(parent)
|
QTableView(parent)
|
||||||
{
|
{
|
||||||
QString tableStylesheet = "QTableView {color:white; border:0px;alternate-background-color: #2E2E2E;background-color: #2B2B2B; outline: 0px;}"
|
QString tableStylesheet = "QTableView {color:white; border:0px;alternate-background-color: #2E2E2E;background-color: #2B2B2B; outline: 0px;}"
|
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
#include <QTableView>
|
#include <QTableView>
|
||||||
|
|
||||||
class ScrapperTableView : public QTableView
|
class ScraperTableView : public QTableView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit ScrapperTableView(QWidget *parent = 0);
|
explicit ScraperTableView(QWidget *parent = 0);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
#include "search_single_comic.h"
|
#include "search_single_comic.h"
|
||||||
|
|
||||||
#include "scrapper_lineedit.h"
|
#include "scraper_lineedit.h"
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
@ -13,9 +13,9 @@ SearchSingleComic::SearchSingleComic(QWidget * parent)
|
|||||||
QLabel * label = new QLabel(tr("No results found, please provide some aditional information. At least one field is needed."));
|
QLabel * label = new QLabel(tr("No results found, please provide some aditional information. At least one field is needed."));
|
||||||
label->setStyleSheet("QLabel {color:white; font-size:12px;font-family:Arial;}");
|
label->setStyleSheet("QLabel {color:white; font-size:12px;font-family:Arial;}");
|
||||||
|
|
||||||
titleEdit = new ScrapperLineEdit(tr("Title:"));
|
titleEdit = new ScraperLineEdit(tr("Title:"));
|
||||||
numberEdit = new ScrapperLineEdit(tr("Number:"));
|
numberEdit = new ScraperLineEdit(tr("Number:"));
|
||||||
volumeEdit = new ScrapperLineEdit(tr("Series:"));
|
volumeEdit = new ScraperLineEdit(tr("Series:"));
|
||||||
|
|
||||||
numberEdit->setMaximumWidth(126);
|
numberEdit->setMaximumWidth(126);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
class ScrapperLineEdit;
|
class ScraperLineEdit;
|
||||||
|
|
||||||
class SearchSingleComic : public QWidget
|
class SearchSingleComic : public QWidget
|
||||||
{
|
{
|
||||||
@ -14,8 +14,8 @@ public:
|
|||||||
QString getComicInfo();
|
QString getComicInfo();
|
||||||
int getComicNumber();
|
int getComicNumber();
|
||||||
private:
|
private:
|
||||||
ScrapperLineEdit * titleEdit;
|
ScraperLineEdit * titleEdit;
|
||||||
ScrapperLineEdit * numberEdit;
|
ScraperLineEdit * numberEdit;
|
||||||
ScrapperLineEdit * volumeEdit;
|
ScraperLineEdit * volumeEdit;
|
||||||
};
|
};
|
||||||
#endif // SEARCH_SINGLE_COMIC_H
|
#endif // SEARCH_SINGLE_COMIC_H
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "search_volume.h"
|
#include "search_volume.h"
|
||||||
|
|
||||||
#include "scrapper_lineedit.h"
|
#include "scraper_lineedit.h"
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
@ -11,7 +11,7 @@ SearchVolume::SearchVolume(QWidget * parent)
|
|||||||
QLabel * label = new QLabel(tr("No results found, please provide some aditional information."));
|
QLabel * label = new QLabel(tr("No results found, please provide some aditional information."));
|
||||||
label->setStyleSheet("QLabel {color:white; font-size:12px;font-family:Arial;}");
|
label->setStyleSheet("QLabel {color:white; font-size:12px;font-family:Arial;}");
|
||||||
|
|
||||||
volumeEdit = new ScrapperLineEdit(tr("Series:"));
|
volumeEdit = new ScraperLineEdit(tr("Series:"));
|
||||||
|
|
||||||
QVBoxLayout * l = new QVBoxLayout;
|
QVBoxLayout * l = new QVBoxLayout;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
class ScrapperLineEdit;
|
class ScraperLineEdit;
|
||||||
|
|
||||||
|
|
||||||
class SearchVolume : public QWidget
|
class SearchVolume : public QWidget
|
||||||
@ -14,7 +14,7 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
QString getVolumeInfo();
|
QString getVolumeInfo();
|
||||||
private:
|
private:
|
||||||
ScrapperLineEdit * volumeEdit;
|
ScraperLineEdit * volumeEdit;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SEARCH_VOLUME_H
|
#endif // SEARCH_VOLUME_H
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
|
|
||||||
#include "scrapper_tableview.h"
|
#include "scraper_tableview.h"
|
||||||
|
|
||||||
#include <QtScript>
|
#include <QtScript>
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ SelectVolume::SelectVolume(QWidget *parent)
|
|||||||
//iScroll->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
//iScroll->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||||
//iScroll->show();
|
//iScroll->show();
|
||||||
|
|
||||||
tableVolumes = new ScrapperTableView();
|
tableVolumes = new ScraperTableView();
|
||||||
//connections
|
//connections
|
||||||
connect(tableVolumes,SIGNAL(clicked(QModelIndex)),this,SLOT(loadVolumeInfo(QModelIndex)));
|
connect(tableVolumes,SIGNAL(clicked(QModelIndex)),this,SLOT(loadVolumeInfo(QModelIndex)));
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ class QLabel;
|
|||||||
class VolumesModel;
|
class VolumesModel;
|
||||||
class QModelIndex;
|
class QModelIndex;
|
||||||
|
|
||||||
class ScrapperTableView;
|
class ScraperTableView;
|
||||||
|
|
||||||
class SelectVolume : public QWidget
|
class SelectVolume : public QWidget
|
||||||
{
|
{
|
||||||
@ -25,7 +25,7 @@ public slots:
|
|||||||
private:
|
private:
|
||||||
QLabel * cover;
|
QLabel * cover;
|
||||||
QLabel * detailLabel;
|
QLabel * detailLabel;
|
||||||
ScrapperTableView * tableVolumes;
|
ScraperTableView * tableVolumes;
|
||||||
VolumesModel * model;
|
VolumesModel * model;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
|
||||||
#include "scrapper_tableview.h"
|
#include "scraper_tableview.h"
|
||||||
#include "local_comic_list_model.h"
|
#include "local_comic_list_model.h"
|
||||||
#include "volume_comics_model.h"
|
#include "volume_comics_model.h"
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ SortVolumeComics::SortVolumeComics(QWidget *parent) :
|
|||||||
QHBoxLayout * content = new QHBoxLayout;
|
QHBoxLayout * content = new QHBoxLayout;
|
||||||
QHBoxLayout * sortButtonsLayout = new QHBoxLayout;
|
QHBoxLayout * sortButtonsLayout = new QHBoxLayout;
|
||||||
|
|
||||||
tableFiles = new ScrapperTableView();
|
tableFiles = new ScraperTableView();
|
||||||
tableVolumeComics = new ScrapperTableView();
|
tableVolumeComics = new ScraperTableView();
|
||||||
|
|
||||||
tableFiles->setFixedSize(407,341);
|
tableFiles->setFixedSize(407,341);
|
||||||
tableVolumeComics->setFixedSize(407,341);
|
tableVolumeComics->setFixedSize(407,341);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "comic_db.h"
|
#include "comic_db.h"
|
||||||
|
|
||||||
class ScrapperTableView;
|
class ScraperTableView;
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
class LocalComicListModel;
|
class LocalComicListModel;
|
||||||
class VolumeComicsModel;
|
class VolumeComicsModel;
|
||||||
@ -26,8 +26,8 @@ protected slots:
|
|||||||
void synchronizeScroll(int pos);
|
void synchronizeScroll(int pos);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ScrapperTableView * tableFiles;
|
ScraperTableView * tableFiles;
|
||||||
ScrapperTableView * tableVolumeComics;
|
ScraperTableView * tableVolumeComics;
|
||||||
|
|
||||||
LocalComicListModel * localComicsModel;
|
LocalComicListModel * localComicsModel;
|
||||||
VolumeComicsModel * volumeComicsModel;
|
VolumeComicsModel * volumeComicsModel;
|
||||||
|
Reference in New Issue
Block a user