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

Stellarium / stellarium / 6685397774

29 Oct 2023 07:37PM UTC coverage: 11.735% (-0.002%) from 11.737%
6685397774

push

github

10110111
Deduplicate title bar implementation

131 of 131 new or added lines in 56 files covered. (100.0%)

14842 of 126472 relevant lines covered (11.74%)

21617.74 hits per line

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

0.0
/src/gui/GreatRedSpotDialog.cpp
1
/*
2
 * Stellarium
3
 * Copyright (C) 2016 Alexander Wolf
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
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
#include <QDesktopServices>
20
#include <QUrl>
21
#include <QSettings>
22

23
#include "StelApp.hpp"
24
#include "StelModuleMgr.hpp"
25
#include "StelUtils.hpp"
26
#include "StelLocaleMgr.hpp"
27
#include "GreatRedSpotDialog.hpp"
28

29
#include "ui_greatRedSpotDialog.h"
30

31
GreatRedSpotDialog::GreatRedSpotDialog() : StelDialog("GreatRedSpot")
×
32
{
33
        ui = new Ui_GreatRedSpotDialogForm;
×
34
}
×
35

36
GreatRedSpotDialog::~GreatRedSpotDialog()
×
37
{
38
        delete ui;
×
39
        ui=Q_NULLPTR;
×
40
}
×
41

42
void GreatRedSpotDialog::retranslate()
×
43
{
44
        if (dialog)
×
45
                ui->retranslateUi(dialog);
×
46
}
×
47

48
void GreatRedSpotDialog::createDialogContent()
×
49
{
50
        ui->setupUi(dialog);
×
51
        
52
        //Signals and slots
53
        connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
×
54
        connect(ui->titleBar, &TitleBar::closeClicked, this, &StelDialog::close);
×
55
        connect(ui->titleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));
×
56

57
        SolarSystem* ss = GETSTELMODULE(SolarSystem);
×
58
        connectIntProperty(ui->longitudeSpinBox, "SolarSystem.grsLongitude");
×
59
        connectDoubleProperty(ui->driftDoubleSpinBox, "SolarSystem.grsDrift");
×
60

61
        const StelLocaleMgr& locmgr = StelApp::getInstance().getLocaleMgr();
×
62
        QString fmt = QString("%1 hh:mm").arg(locmgr.getQtDateFormatStr());
×
63
        ui->jdDateTimeEdit->setDisplayFormat(fmt);
×
64
        ui->jdDateTimeEdit->setDateTime(StelUtils::jdToQDateTime(ss->getGrsJD(), Qt::UTC));
×
65
        connect(ui->jdDateTimeEdit, SIGNAL(dateTimeChanged(QDateTime)), this, SLOT(setGrsJD(QDateTime)));
×
66

67
        connect(ui->recentGrsMeasurementPushButton, SIGNAL(clicked(bool)), this, SLOT(openRecentGrsMeasurement()));
×
68
}
×
69

70
void GreatRedSpotDialog::setGrsJD(QDateTime dt)
×
71
{
72
        GETSTELMODULE(SolarSystem)->setGrsJD(StelUtils::qDateTimeToJd(dt));
×
73
}
×
74

75
void GreatRedSpotDialog::openRecentGrsMeasurement()
×
76
{
77
        QSettings* conf = StelApp::getInstance().getSettings();
×
78
        QDesktopServices::openUrl(QUrl(conf->value("astro/grs_measurements_url", "http://jupos.privat.t-online.de/rGrs.htm").toString()));
×
79
}
×
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