mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 15:15:07 +00:00
ChanViewer: Start working on a simple read-only 4Chan viewer
Since they are nice enough to provide a JSON API over HTTP, this makes for a perfect way to exercise our networking code a bit. :^)
This commit is contained in:
parent
210550d4b3
commit
030891531b
6 changed files with 177 additions and 0 deletions
25
Applications/ChanViewer/main.cpp
Normal file
25
Applications/ChanViewer/main.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "ThreadCatalogModel.h"
|
||||
#include <LibGUI/GApplication.h>
|
||||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GTableView.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
GApplication app(argc, argv);
|
||||
|
||||
auto* window = new GWindow;
|
||||
window->set_title("ChanViewer");
|
||||
window->set_rect(100, 100, 640, 480);
|
||||
|
||||
auto* widget = new GWidget;
|
||||
window->set_main_widget(widget);
|
||||
widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||
|
||||
auto* catalog_view = new GTableView(widget);
|
||||
catalog_view->set_model(ThreadCatalogModel::create());
|
||||
|
||||
window->show();
|
||||
|
||||
return app.exec();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue