17 QVBoxLayout *layout =
new QVBoxLayout(
this);
18 layout->setContentsMargins(10, 0, 10, 0);
19 layout->addSpacing(2);
21 QWidget *centerWidget =
new QWidget(
this);
22 QHBoxLayout *centerWidgetLayout =
new QHBoxLayout(centerWidget);
23 centerWidgetLayout->setContentsMargins(0, 0, 0, 0);
25 QWidget *textWidget =
new QWidget(centerWidget);
26 QVBoxLayout *textWidgetLayout =
new QVBoxLayout(textWidget);
27 textWidgetLayout->setContentsMargins(0, 5, 0, 6);
28 textWidgetLayout->setSpacing(0);
30 QWidget *userWidget =
new QWidget(textWidget);
31 QHBoxLayout *userWidgetLayout =
new QHBoxLayout(userWidget);
32 userWidgetLayout->setContentsMargins(0, 0, 0, 0);
33 userWidgetLayout->setSpacing(2);
38 m_userCommit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
44 userWidget->setLayout(userWidgetLayout);
46 QWidget *operWidget =
new QWidget(textWidget);
47 QHBoxLayout *operWidgetLayout =
new QHBoxLayout(operWidget);
48 operWidgetLayout->setContentsMargins(0, 0, 0, 0);
49 operWidgetLayout->setSpacing(4);
57 QFrame *spliteLine1 =
new QFrame(operWidget);
58 spliteLine1->setFixedWidth(1);
59 spliteLine1->setFrameShape(QFrame::VLine);
62 QPushButton *starButton =
new QPushButton(operWidget);
63 starButton->setCursor(QCursor(Qt::PointingHandCursor));
64 starButton->setFixedSize(12, 11);
71 QFrame *spliteLine2 =
new QFrame(operWidget);
72 spliteLine2->setFixedWidth(1);
73 spliteLine2->setFrameShape(QFrame::VLine);
79 starButton->setFocusPolicy(Qt::NoFocus);
83 operWidgetLayout->addStretch(1);
84 operWidgetLayout->addWidget(ngReportLabel);
85 operWidgetLayout->addWidget(spliteLine1);
86 operWidgetLayout->addWidget(starButton);
88 operWidgetLayout->addWidget(spliteLine2);
89 operWidgetLayout->addWidget(ReplyLabel);
90 operWidget->setLayout(operWidgetLayout);
92 textWidgetLayout->addWidget(userWidget);
93 textWidgetLayout->addWidget(operWidget);
94 textWidget->setLayout(textWidgetLayout);
100 centerWidgetLayout->addWidget(textWidget);
101 centerWidget->setLayout(centerWidgetLayout);
103 QFrame *solidLine =
new QFrame(
this);
104 solidLine->setFixedHeight(1);
107 layout->addWidget(centerWidget);
108 layout->addWidget(solidLine);
131 connect(d, SIGNAL(downLoadRawDataChanged(QByteArray)), SLOT(
downLoadFinished(QByteArray)));
144 if(pix.loadFromData(bytes))
156 m_commentsLabel(nullptr),
157 m_messageComments(nullptr),
158 m_pageQueryWidget(nullptr),
159 m_networkRequest(nullptr)
178 setObjectName(className());
181 QVBoxLayout *mainLayout =
new QVBoxLayout(
this);
182 mainLayout->setContentsMargins(0, 0, 0, 0);
183 mainLayout->setSpacing(0);
185 QWidget *topWidget =
nullptr;
188 topWidget =
new QWidget(
this);
189 topWidget->setFixedHeight(40);
190 QHBoxLayout *topWidgetLayout =
new QHBoxLayout(topWidget);
191 topWidgetLayout->setContentsMargins(0, 0, 10, 0);
197 QPushButton *closeButton =
new QPushButton(
this);
198 closeButton->setFixedSize(14, 14);
200 closeButton->setCursor(QCursor(Qt::PointingHandCursor));
202 closeButton->setFocusPolicy(Qt::NoFocus);
204 connect(closeButton, SIGNAL(clicked()), SLOT(close()));
206 topWidgetLayout->addWidget(closeButton);
207 topWidget->setLayout(topWidgetLayout);
215 QWidget *contentsWidget =
new QWidget(
this);
216 QVBoxLayout *contentsLayout =
new QVBoxLayout(contentsWidget);
217 contentsLayout->setContentsMargins(0, 0, 0 ,0);
218 contentsLayout->setSpacing(0);
220 QWidget *messageBox =
new QWidget(contentsWidget);
221 messageBox->setAttribute(Qt::WA_TranslucentBackground,
true);
222 messageBox->setFixedHeight(60);
223 QVBoxLayout *messageBoxLayout =
new QVBoxLayout(messageBox);
224 messageBoxLayout->setContentsMargins(10, 10, 10, 3);
227 QFrame *solidLine =
new QFrame(messageBox);
228 solidLine->setFrameShape(QFrame::HLine);
229 solidLine->setFixedHeight(1);
233 messageBoxLayout->addWidget(solidLine);
234 messageBox->setLayout(messageBoxLayout);
238 messageCommentsLayout->setContentsMargins(0, 0, 0, 0);
241 contentsLayout->addWidget(messageBox);
243 contentsWidget->setLayout(contentsLayout);
247 QScrollArea *scrollArea =
new QScrollArea(
this);
250 contentsWidget->setObjectName(
"ContentsWidget");
252 QWidget *view = scrollArea->viewport();
253 view->setObjectName(
"Viewport");
256 mainLayout->addWidget(topWidget);
257 mainLayout->addWidget(scrollArea);
261 mainLayout->addWidget(contentsWidget);
266 setLayout(mainLayout);
274 connect(
m_networkRequest, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
291 layout->insertWidget(layout->count() - 1, comment);
295 setFixedHeight(height() + comment->height());
324 m_topLabel->setText(tr(
"<span style='font-size:15pt;color:#AAAAAA;font-style:bold;'>\"%1\" Commit</span>"
325 "<span style='font-size:11pt;color:#666666;font-style:bold;'> (Just %2 Commits)</span>").arg(name).arg(total));
The class of the search result data item.
static const QString BorderStyle01
border
int pageTotalSize() const noexcept
virtual void startToRequest(const QString &url)=0
static constexpr const char * BtnPClose
int exec(ProcessEventsFlags flags=AllEvents)
static const QString ColorStyle04
The class of the label widget that can click.
static const QString BorderStyle04
The class of the ttk event loop.
static constexpr const char * InteriorStar
static const QString BackgroundStyle01
Background.
The class of the page query widget.
#define TTK_DATE_TIMES_FORMAT
virtual void startToPage(int offset)
void page(int index, int total)
static const QString ColorStyle03
QWidget * createPageWidget(QWidget *parent, int total)
static const QString BackgroundStyle07
#define G_DOWNLOAD_QUERY_PTR
The class of the cover data download request.
static QString format(const QString &time, const QString &format)
#define TTK_ERROR_STREAM(msg)
int totalSize() const noexcept
#define TTKObjectCast(x, y)