Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#
# Tool shows a widget on each screen, stating the screen id of the screen the widget is positioned on
#
# $Id: CMakeLists.txt 38619 2018-02-02 15:14:02Z wille_m $
# $HeadURL: svn://slssvn/TDS/branches/product/devel/trunk/Lts/Tools/ConfigX/CMakeLists.txt $
# $Author: wille_m $
#
# Created by Mike Wille, NLE, 2018-11-11
#
IF(NOT WIN32)
SET(ScreenIdShow_SRCS
main.cpp
)
NGL_ADD_EXECUTABLE(WS ScreenIdShow NO_TRANSLATION ${ScreenIdShow_SRCS})
NGL_TARGET_LINK_LIBRARIES(ScreenIdShow
Qt5::Widgets
)
NGL_INSTALL_TARGET(ScreenIdShow)
ENDIF(NOT WIN32)
+41
View File
@@ -0,0 +1,41 @@
#include <QApplication>
#include <QWidget>
#include <QLabel>
#include <QScreen>
#include <QRect>
#include <QSize>
#include <QFont>
#include <QDebug>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QList<QScreen *> screenList = QApplication::screens();
qWarning() << "screen count" << screenList.count();
for (int i = 0; i < screenList.count(); i++)
{
QScreen *screen = screenList.at(i);
QRect screenGeo(screen->geometry());
qWarning() << "screen" << i << "at" << screenGeo;
QWidget *widget = new QWidget(nullptr);
QLabel *label = new QLabel(QString::number(i), widget);
label->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
QFont font(label->font());
font.setBold(true);
font.setPointSize(120);
label->setFont(font);
widget->setGeometry(QRect(screenGeo.topLeft(), QSize(200, 200)));
widget->activateWindow();
widget->show();
}
return app.exec();
}