mirror of
https://github.com/Quill-OS/quill.git
synced 2024-10-31 21:33:22 -07:00
Progress with libraryWidget
This commit is contained in:
parent
20980325de
commit
bcebf0ec4b
4 changed files with 160 additions and 7 deletions
|
@ -225,3 +225,128 @@ void libraryWidget::on_nextBtn_clicked()
|
|||
ui->pageLabel->setText("2 <i>of</i> 2");
|
||||
}
|
||||
|
||||
QString libraryWidget::getTitle(int bookNumber) {
|
||||
QString bookNumberQstr = QString::number(bookNumber);
|
||||
QString fullTitlePath = "/mnt/onboard/onboard/.inkbox/gutenberg-data/latest-books/";
|
||||
fullTitlePath = fullTitlePath.append(bookNumberQstr);
|
||||
fullTitlePath = fullTitlePath.append("/title_full");
|
||||
qDebug() << fullTitlePath;
|
||||
|
||||
return readFile(fullTitlePath);
|
||||
}
|
||||
|
||||
void libraryWidget::openLatestBookInfoDialog(int bookNumber, QString title) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book1Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(1);
|
||||
openLatestBookInfoDialog(1, title);
|
||||
}
|
||||
|
||||
void libraryWidget::on_book2Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(2);
|
||||
openLatestBookInfoDialog(2, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book3Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(3);
|
||||
openLatestBookInfoDialog(3, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book4Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(4);
|
||||
openLatestBookInfoDialog(4, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book5Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(5);
|
||||
openLatestBookInfoDialog(5, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book6Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(6);
|
||||
openLatestBookInfoDialog(6, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book7Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(7);
|
||||
openLatestBookInfoDialog(7, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book8Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(8);
|
||||
openLatestBookInfoDialog(8, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book9Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(9);
|
||||
openLatestBookInfoDialog(9, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book10Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(10);
|
||||
openLatestBookInfoDialog(10, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book11Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(11);
|
||||
openLatestBookInfoDialog(11, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book12Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(12);
|
||||
openLatestBookInfoDialog(12, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book13Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(13);
|
||||
openLatestBookInfoDialog(13, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book14Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(14);
|
||||
openLatestBookInfoDialog(14, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book15Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(15);
|
||||
openLatestBookInfoDialog(15, title);
|
||||
}
|
||||
|
||||
|
||||
void libraryWidget::on_book16Btn_clicked()
|
||||
{
|
||||
QString title = getTitle(16);
|
||||
openLatestBookInfoDialog(16, title);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,9 +28,27 @@ private slots:
|
|||
void syncCatalog();
|
||||
void setupView();
|
||||
void showToast(QString messageToDisplay);
|
||||
QString getTitle(int bookNumber);
|
||||
void openLatestBookInfoDialog(int bookNumber, QString title);
|
||||
|
||||
void on_previousBtn_clicked();
|
||||
void on_nextBtn_clicked();
|
||||
void on_book1Btn_clicked();
|
||||
void on_book2Btn_clicked();
|
||||
void on_book3Btn_clicked();
|
||||
void on_book4Btn_clicked();
|
||||
void on_book5Btn_clicked();
|
||||
void on_book6Btn_clicked();
|
||||
void on_book7Btn_clicked();
|
||||
void on_book8Btn_clicked();
|
||||
void on_book9Btn_clicked();
|
||||
void on_book10Btn_clicked();
|
||||
void on_book11Btn_clicked();
|
||||
void on_book12Btn_clicked();
|
||||
void on_book13Btn_clicked();
|
||||
void on_book14Btn_clicked();
|
||||
void on_book15Btn_clicked();
|
||||
void on_book16Btn_clicked();
|
||||
};
|
||||
|
||||
#endif // LIBRARYWIDGET_H
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<item row="4" column="0">
|
||||
<widget class="QStackedWidget" name="booksStackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
|
|
|
@ -39,6 +39,11 @@ QPushButton[type="bw"]
|
|||
border: none;
|
||||
}
|
||||
|
||||
QPushButton
|
||||
{
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
QLabel[type="mangainfolabel"]
|
||||
{
|
||||
font-weight: bold;
|
||||
|
@ -178,7 +183,9 @@ QLineEdit, QSpinBox, QDoubleSpinBox
|
|||
background-color:white;
|
||||
border:1px solid black;
|
||||
padding: 2px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
QLineEdit:focus, QSpinBox:focus, QDoubleSpinBox:focus
|
||||
{
|
||||
border: 1px solid black;
|
||||
|
@ -207,7 +214,7 @@ QComboBox
|
|||
{
|
||||
background-color:white;
|
||||
border: 1.5px solid black;
|
||||
border-radius:5px;
|
||||
border-radius:10px;
|
||||
padding-top: 3px;
|
||||
padding-right: 0px;
|
||||
padding-bottom: 3px;
|
||||
|
@ -224,6 +231,7 @@ QComboBox:focus
|
|||
QComboBox::drop-down
|
||||
{
|
||||
border-width:1px;
|
||||
border-radius:10px;
|
||||
}
|
||||
QComboBox::down-arrow {
|
||||
image:url(:/down-arrow.png);
|
||||
|
@ -318,7 +326,7 @@ QToolButton:pressed {
|
|||
|
||||
QSlider::groove:horizontal {
|
||||
border: 1.5px solid black;
|
||||
border-radius: 0px;
|
||||
border-radius: 10px;
|
||||
height: 15px;
|
||||
background: white;
|
||||
margin: 0px 0;
|
||||
|
@ -326,11 +334,10 @@ QSlider::groove:horizontal {
|
|||
QSlider::handle:horizontal {
|
||||
background: black;
|
||||
border: 1.5px solid black;
|
||||
border-radius: 0px;
|
||||
border-radius: 10px;
|
||||
height: 15px;
|
||||
width: 25px;
|
||||
margin: 0px 0;
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
QSlider::handle:horizontal::focus {
|
||||
|
@ -338,8 +345,9 @@ QSlider::handle:horizontal::focus {
|
|||
}
|
||||
|
||||
QScrollBar {
|
||||
background: white;
|
||||
border: 5px solid lightGrey;
|
||||
background: white;
|
||||
border: 5px solid lightGrey;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
QScrollBar:vertical {
|
||||
|
@ -363,11 +371,13 @@ QScrollBar::sub-line {
|
|||
|
||||
QDialog {
|
||||
border: 5px solid black;
|
||||
border-radius: 10px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
QProgressBar {
|
||||
border: 1.5px solid black;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
background: white;
|
||||
color: rgb(160, 160, 160);
|
||||
|
|
Loading…
Reference in a new issue