This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
modern-linbo-gui/sources/main.cpp

37 lines
778 B
C++
Raw Normal View History

// STL-includes
#include <iostream>
#include <qwindowsystem_qws.h>
#include <QWSServer>
#include <qimage.h>
#include <qtimer.h>
// qt
#include <qapplication.h>
#include <QtGui>
#include <QPalette>
#include <QBrush>
#include <QScreen>
#include <QLocale>
#include "linbogui.h"
int main( int argc, char* argv[] )
{
QApplication linboGuiApp( argc, argv );
QWSServer* wsServer = QWSServer::instance();
QImage bgimg( "/icons/linbo_wallpaper.png", "PNG" );
int width = qt_screen->deviceWidth();
int height = qt_screen->deviceHeight();
if ( wsServer ) {
wsServer->setBackground( QBrush( bgimg.scaled( width, height, Qt::IgnoreAspectRatio ) ) );
wsServer->refresh();
}
LinboGui* linboGui = new LinboGui;
linboGui->show();
return linboGuiApp.exec();
}