• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Stellarium / stellarium / 13149582607

03 Feb 2025 11:24AM UTC coverage: 12.101% (-0.04%) from 12.141%
13149582607

push

github

web-flow
Translate po/stellarium/stellarium.pot in zh_CN

100% translated source file: 'po/stellarium/stellarium.pot'
on 'zh_CN'.

14603 of 120671 relevant lines covered (12.1%)

18593.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/StelSplashScreen.hpp
1
/*
2
 * Copyright (C) 2019 Ruslan Kabatsayev
3
 *
4
 * This program is free software; you can redistribute it and/or
5
 * modify it under the terms of the GNU General Public License
6
 * as published by the Free Software Foundation; either version 2
7
 * of the License, or (at your option) any later version.
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, USA.
17
 */
18

19
#ifndef STELLARIUM_SPLASH_SCREEN_HPP
20
#define STELLARIUM_SPLASH_SCREEN_HPP
21

22
#include <memory>
23
#include <QThread>
24
#include <QApplication>
25
#include <QSplashScreen>
26

27
class SplashTextHolder;
28
struct SplashScreenTextHorizMetrics
29
{
30
        int shift;
31
        int width;
32
};
33
class SplashScreen
34
{
35
        class SplashScreenWidget : public QSplashScreen
36
        {
37
                QPixmap makePixmap(double sizeRatio);
38
        public:
39
                SplashScreenWidget(double sizeRatio);
40
                void ensureFirstPaint() const
×
41
                {
42
                        while(!painted)
×
43
                        {
44
                                QThread::msleep(1);
×
45
                                qApp->processEvents();
×
46
                        }
47
                }
×
48

49
        protected:
50
                void paintEvent(QPaintEvent*) override;
51

52
        private:
53
                std::unique_ptr<SplashTextHolder> textHolder;
54
                QFont splashFont;
55
                QFont titleFont;
56
                QFont subtitleFont;
57
                QFont versionFont;
58
                double sizeRatio = 1;
59
                bool painted=false;
60
                SplashScreenTextHorizMetrics titleHM;
61
                SplashScreenTextHorizMetrics subtitleHM;
62
                SplashScreenTextHorizMetrics versionHM;
63
        };
64

65
        static SplashScreenWidget* instance;
66

67
public:
68
        static void present(double sizeRatio);
69
        static void finish(QWidget* mainWindow);
70
        static void showMessage(QString const& message);
71
        static void clearMessage();
72
};
73

74
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc