comparison src/gui/pages/seasons.cc @ 255:fe702c8f161f

*: whatever
author Paper <paper@paper.us.eu.org>
date Wed, 07 Feb 2024 17:04:06 -0500
parents d14f8e0e40c3
children 862d0d8619f6
comparison
equal deleted inserted replaced
254:d14f8e0e40c3 255:fe702c8f161f
7 #include <QVBoxLayout> 7 #include <QVBoxLayout>
8 #include <QToolBar> 8 #include <QToolBar>
9 #include <QFrame> 9 #include <QFrame>
10 #include <QListWidget> 10 #include <QListWidget>
11 #include <QListWidgetItem> 11 #include <QListWidgetItem>
12 #include <QMenu>
13 #include <QToolButton>
12 14
13 SeasonsPage::SeasonsPage(QWidget* parent) : QWidget(parent) { 15 SeasonsPage::SeasonsPage(QWidget* parent) : QWidget(parent) {
14 QVBoxLayout* full_layout = new QVBoxLayout(this); 16 QVBoxLayout* full_layout = new QVBoxLayout(this);
15 17
16 { 18 {
19 toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); 21 toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
20 toolbar->setIconSize(QSize(16, 16)); 22 toolbar->setIconSize(QSize(16, 16));
21 toolbar->setMovable(false); 23 toolbar->setMovable(false);
22 24
23 { 25 {
24 /* this needs to be stored somewhere to replicate Taiga's 26 {
25 "timer" feature */ 27 QAction* action = new QAction(toolbar);
26 toolbar->addAction("Aids"); 28 action->setIcon(QIcon(":/icons/16x16/calendar-previous.png"));
29 action->setToolTip(tr("Previous season"));
30 toolbar->addAction(action);
31 }
32
33 {
34 QAction* action = new QAction(toolbar);
35 action->setIcon(QIcon(":/icons/16x16/calendar-next.png"));
36 action->setToolTip(tr("Next season"));
37 toolbar->addAction(action);
38 }
39
40 toolbar->addAction(QIcon(":/icons/16x16/calendar.png"), "Fall 2024"); // this must be named the name of the season
27 } 41 }
28 42
29 toolbar->addSeparator(); 43 toolbar->addSeparator();
30 44
31 { 45 {
32 toolbar->addAction(QIcon(":/icons/16x16/navigation-270-button.png"), tr("Download &marked torrents")); 46 toolbar->addAction(QIcon(":/icons/16x16/arrow-circle-315.png"), tr("Refresh data"));
33 }
34
35 {
36 toolbar->addAction(QIcon(":/icons/16x16/cross-button.png"), tr("&Discard all"));
37 } 47 }
38 48
39 toolbar->addSeparator(); 49 toolbar->addSeparator();
40 50
41 { 51 {
42 toolbar->addAction(QIcon(":/icons/16x16/gear.png"), tr("&Settings")); 52 QToolButton* button = new QToolButton(toolbar);
53
54 {
55 /* links */
56 QMenu* menu = new QMenu(button);
57 menu->addAction("Airing status");
58 menu->addAction("List status");
59 menu->addAction("Type");
60 button->setMenu(menu);
61 }
62
63 button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
64 button->setIcon(QIcon(":/icons/16x16/category.png"));
65 button->setText("Group by:");
66 button->setPopupMode(QToolButton::InstantPopup);
67 toolbar->addWidget(button);
68 }
69
70 {
71 QToolButton* button = new QToolButton(toolbar);
72
73 {
74 /* links */
75 QMenu* menu = new QMenu(button);
76 menu->addAction("Airing date");
77 menu->addAction("Episodes");
78 menu->addAction("Popularity");
79 menu->addAction("Score");
80 menu->addAction("Title");
81 button->setMenu(menu);
82 }
83
84 button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
85 button->setIcon(QIcon(":/icons/16x16/sort-quantity-descending.png"));
86 button->setText("Sort by:");
87 button->setPopupMode(QToolButton::InstantPopup);
88 toolbar->addWidget(button);
89 }
90
91 {
92 QToolButton* button = new QToolButton(toolbar);
93
94 {
95 /* links */
96 QMenu* menu = new QMenu(button);
97 menu->addAction("Images");
98 menu->addAction("Details");
99 button->setMenu(menu);
100 }
101
102 button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
103 button->setIcon(QIcon(":/icons/16x16/ui-scroll-pane-detail.png"));
104 button->setText("View:");
105 button->setPopupMode(QToolButton::InstantPopup);
106 toolbar->addWidget(button);
43 } 107 }
44 108
45 full_layout->addWidget(toolbar); 109 full_layout->addWidget(toolbar);
46 } 110 }
47 111