-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.cpp
executable file
·48 lines (37 loc) · 1.06 KB
/
mainwindow.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDebug>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
#include <QHBoxLayout>
#include "threadpost.h"
#include "threadslist.h"
ThreadsList *threadsList;
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
threadsList = new ThreadsList(this);
ui->stackedWidget->insertWidget(0, threadsList);
ui->stackedWidget->setCurrentIndex(0);
}
void MainWindow::resizeEvent(QResizeEvent *event){
ui->scrollAreaWidgetContents->setMaximumWidth(width()-20);
//emit resizeWindow(width(),height());
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::openThread(int threadNum, QString board){
QString url = QString("https://2ch.hk/makaba/mobile.fcgi?task=get_thread&board=%1&thread=%2&post=1").arg(
board, threadNum
);
qDebug() << url;
}
void MainWindow::on_pushButton_clicked()
{
threadsList->drawThreads(ui->lineEdit->text(),1);
}