mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 11:32:21 +08:00
23de7b166e
* rough multiple language demo * more wrappings * stash * add some bad translations * updates * map from french to spanish still has same problem of needing to call setText on everything * add files * restart UI * use return code * relative path * more translations * don't loop restart * Toggle and prime translations * try on device * try QComboBox with readable style * stash * not yet scrollable * stash * dynamic translations (doesn't work for dynamic widget strings yet) * clean up multiple option selector * store languages in json * try transparent * Try transparent popup * see how this looks * tweaks * clean up * update names * Add Chinese (Simplified) translations * Do missing French translations * unit tests caught that :) * fix test * fix other test (on PC) * add entries to dialog to test * add cancel button, clean up a bit * just chinese * some clean up * use quotes * clean up * Just quit, set timeout to 0 * half a second * use exitcode * don't print if it's expected * this comment is outdated * update translations * Update translations * re-order input classes * Update line numbers * use enabled property for button style * Get rid of ListWidget * Update line numbers * Log failed to load language * Log failed to load language * Move to utils and fix english logging extra line * Update translations * spacing * looks a bit better * try this instead of exitcode fixes fix * only one function * comment * Update line numbers * fixup some japanese translations * clean up multi option dialog * Update line numbers old-commit-hash: 949de4d2b6b293d9f77d83c58212f5dee176cbf1
30 lines
1.1 KiB
C++
30 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <optional>
|
|
|
|
#include <QDateTime>
|
|
#include <QLayout>
|
|
#include <QPainter>
|
|
#include <QPixmap>
|
|
#include <QSurfaceFormat>
|
|
#include <QWidget>
|
|
|
|
QString getVersion();
|
|
QString getBrand();
|
|
QString getBrandVersion();
|
|
QString getUserAgent();
|
|
std::optional<QString> getDongleId();
|
|
QMap<QString, QString> getSupportedLanguages();
|
|
void configFont(QPainter &p, const QString &family, int size, const QString &style);
|
|
void clearLayout(QLayout* layout);
|
|
void setQtSurfaceFormat();
|
|
QString timeAgo(const QDateTime &date);
|
|
void swagLogMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg);
|
|
void initApp(int argc, char *argv[]);
|
|
QWidget* topWidget (QWidget* widget);
|
|
QPixmap loadPixmap(const QString &fileName, const QSize &size = {}, Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio);
|
|
|
|
QRect getTextRect(QPainter &p, int flags, QString text);
|
|
void drawRoundedRect(QPainter &painter, const QRectF &rect, qreal xRadiusTop, qreal yRadiusTop, qreal xRadiusBottom, qreal yRadiusBottom);
|
|
QColor interpColor(float xv, std::vector<float> xp, std::vector<QColor> fp);
|