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 pix.loadFromData(bytes);
154 m_commentsLabel(nullptr),
155 m_messageComments(nullptr),
156 m_pageQueryWidget(nullptr),
157 m_networkRequest(nullptr)
176 setObjectName(className());
179 QVBoxLayout *mainLayout =
new QVBoxLayout(
this);
180 mainLayout->setContentsMargins(0, 0, 0, 0);
181 mainLayout->setSpacing(0);
183 QWidget *topWidget =
nullptr;
186 topWidget =
new QWidget(
this);
187 topWidget->setFixedHeight(40);
188 QHBoxLayout *topWidgetLayout =
new QHBoxLayout(topWidget);
189 topWidgetLayout->setContentsMargins(0, 0, 10, 0);
195 QPushButton *closeButton =
new QPushButton(
this);
196 closeButton->setFixedSize(14, 14);
198 closeButton->setCursor(QCursor(Qt::PointingHandCursor));
200 closeButton->setFocusPolicy(Qt::NoFocus);
202 connect(closeButton, SIGNAL(clicked()), SLOT(close()));
204 topWidgetLayout->addWidget(closeButton);
205 topWidget->setLayout(topWidgetLayout);
213 QWidget *contentsWidget =
new QWidget(
this);
214 QVBoxLayout *contentsLayout =
new QVBoxLayout(contentsWidget);
215 contentsLayout->setContentsMargins(0, 0, 0 ,0);
216 contentsLayout->setSpacing(0);
218 QWidget *messageBox =
new QWidget(contentsWidget);
219 messageBox->setAttribute(Qt::WA_TranslucentBackground,
true);
220 messageBox->setFixedHeight(60);
221 QVBoxLayout *messageBoxLayout =
new QVBoxLayout(messageBox);
222 messageBoxLayout->setContentsMargins(10, 10, 10, 3);
225 QFrame *solidLine =
new QFrame(messageBox);
226 solidLine->setFrameShape(QFrame::HLine);
227 solidLine->setFixedHeight(1);
231 messageBoxLayout->addWidget(solidLine);
232 messageBox->setLayout(messageBoxLayout);
236 messageCommentsLayout->setContentsMargins(0, 0, 0, 0);
239 contentsLayout->addWidget(messageBox);
241 contentsWidget->setLayout(contentsLayout);
245 QScrollArea *scrollArea =
new QScrollArea(
this);
248 contentsWidget->setObjectName(
"ContentsWidget");
250 QWidget *view = scrollArea->viewport();
251 view->setObjectName(
"Viewport");
254 mainLayout->addWidget(topWidget);
255 mainLayout->addWidget(scrollArea);
259 mainLayout->addWidget(contentsWidget);
264 setLayout(mainLayout);
272 connect(
m_networkRequest, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
289 layout->insertWidget(layout->count() - 1, comment);
293 setFixedHeight(height() + comment->height());
322 m_topLabel->setText(tr(
"<span style='font-size:15pt;color:#AAAAAA;font-style:bold;'>\"%1\" Commit</span>"
323 "<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
static const QString ColorStyle04
int exec(ProcessEventsFlags flags=AllEvents)
The class of the label widget that can click.
static const QString BorderStyle04
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)
The class of the semaphore event loop.
int totalSize() const noexcept
#define TTKObjectCast(x, y)