Kstars

imagingplanneroptions.cpp
1/*
2 SPDX-FileCopyrightText: 2024 Hy Murveit <hy@murveit.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "imagingplanneroptions.h"
8
9#include "Options.h"
10#include "ui_imagingplanneroptions.h"
11
12
13ImagingPlannerOptionsUI::ImagingPlannerOptionsUI(QWidget *p) : QFrame(p)
14{
15 setupUi(this);
16}
17
18ImagingPlannerOptions::ImagingPlannerOptions(QWidget *parent) : QDialog(parent)
19{
20 ui = new ImagingPlannerOptionsUI(this);
21 QVBoxLayout *mainLayout = new QVBoxLayout(this);
22
23 mainLayout->addWidget(ui);
24
25 setWindowTitle(i18nc("@title:window", "Imaging Planner Options"));
26
27#if 0
29 mainLayout->addWidget(buttonBox);
30 connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
31#endif
32
33 connect(ui->CenterOnSkyMapCB, &QCheckBox::clicked, this, &ImagingPlannerOptions::slotCenterOnSkyMap);
34 connect(ui->IndependentWindowCB, &QCheckBox::clicked, this, &ImagingPlannerOptions::slotIndependentWindow);
35}
36
37void ImagingPlannerOptions::showEvent(QShowEvent *)
38{
39 ui->CenterOnSkyMapCB->setChecked(Options::imagingPlannerCenterOnSkyMap());
40 ui->IndependentWindowCB->setChecked(Options::imagingPlannerIndependentWindow());
41}
42
43void ImagingPlannerOptions::slotCenterOnSkyMap(bool checked)
44{
45 Options::setImagingPlannerCenterOnSkyMap(checked);
46}
47
48void ImagingPlannerOptions::slotIndependentWindow(bool checked)
49{
50 Options::setImagingPlannerIndependentWindow(checked);
51}
QString i18nc(const char *context, const char *text, const TYPE &arg...)
void clicked(bool checked)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.