File indexing completed on 2024-05-19 05:19:21

0001 /*
0002     This file is part of KJots.
0003 
0004     SPDX-FileCopyrightText: 1997 Christoph Neerfeld <Christoph.Neerfeld@home.ivm.de>
0005                   2002, 2003 Aaron J. Seigo <aseigo@kde.org>
0006                   2003 Stanislav Kljuhhin <crz@hot.ee>
0007                   2005-2006 Jaison Lee <lee.jaison@gmail.com>
0008                   2007-2008 Stephen Kelly <steveire@gmail.com>
0009 
0010     SPDX-License-Identifier: GPL-2.0-or-later
0011 */
0012 
0013 #include "KJotsMain.h"
0014 
0015 #include <KActionCollection>
0016 #include <KLocalizedString>
0017 #include <KStandardAction>
0018 
0019 #include <QApplication>
0020 
0021 #include "kjotswidget.h"
0022 
0023 
0024 //----------------------------------------------------------------------
0025 // KJOTSMAIN
0026 //----------------------------------------------------------------------
0027 KJotsMain::KJotsMain(QWidget *parent)
0028     : KXmlGuiWindow(parent)
0029     , component(new KJotsWidget(this, this))
0030 {
0031     KStandardAction::quit(this, &KJotsMain::close, actionCollection());
0032 
0033     setCentralWidget(component);
0034 
0035     setupGUI();
0036     connect(component, &KJotsWidget::captionChanged, this, qOverload<const QString &>(&KJotsMain::setCaption));
0037 }
0038 
0039 bool KJotsMain::queryClose()
0040 {
0041     return component->queryClose();
0042 }
0043 
0044 #include "moc_KJotsMain.cpp"