• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kjots

  • sources
  • kde-4.14
  • kdepim
  • kjots
KJotsMain.cpp
Go to the documentation of this file.
1 //
2 // kjots
3 //
4 // Copyright (C) 1997 Christoph Neerfeld <Christoph.Neerfeld@home.ivm.de>
5 // Copyright (C) 2002, 2003 Aaron J. Seigo <aseigo@kde.org>
6 // Copyright (C) 2003 Stanislav Kljuhhin <crz@hot.ee>
7 // Copyright (C) 2005-2006 Jaison Lee <lee.jaison@gmail.com>
8 // Copyright (C) 2007-2008 Stephen Kelly <steveire@gmail.com>
9 //
10 // This program is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation; either version 2 of the License, or
13 // (at your option) any later version.
14 //
15 // This program is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this program; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 //
24 
25 
26 #include "KJotsMain.h"
27 
28 
29 #include <kicon.h>
30 
31 #include <kaction.h>
32 #include <kactioncollection.h>
33 #include <kdebug.h>
34 #include <kglobalsettings.h>
35 #include <kinputdialog.h>
36 #include <kstandardaction.h>
37 #include <kstatusbar.h>
38 
39 #include "KJotsSettings.h"
40 #include "kjotsbookmarks.h"
41 #include "kjotsedit.h"
42 #include "kjotsbrowser.h"
43 #include "kjotswidget.h"
44 
45 #include <QApplication>
46 
47 //----------------------------------------------------------------------
48 // KJOTSMAIN
49 //----------------------------------------------------------------------
50 KJotsMain::KJotsMain()
51 {
52 
53  // Main widget
54  //
55 
56  KStandardAction::quit(this, SLOT(onQuit()), actionCollection());
57 
58  component = new KJotsWidget(this, this );
59 
60  setCentralWidget(component);
61  statusBar()->insertItem(QString(), 0, 1);
62  statusBar()->setItemAlignment(0, Qt::AlignLeft | Qt::AlignVCenter);
63 
64  connect(component, SIGNAL(activeAnchorChanged(QString,QString)),
65  SLOT(activeAnchorChanged(QString,QString)));
66 
67  setupGUI();
68  connect(component, SIGNAL(captionChanged(QString)), SLOT(updateCaption(QString)));
69 
70 }
71 
75 void KJotsMain::updateCaption(QString caption)
76 {
77  setCaption(caption);
78 }
79 
80 void KJotsMain::activeAnchorChanged(const QString &anchorTarget, const QString &anchorText)
81 {
82  if (!anchorTarget.isEmpty())
83  {
84  statusBar()->changeItem(anchorText + QLatin1String(" -> ") + anchorTarget, 0);
85  } else {
86  statusBar()->changeItem(QString(), 0);
87  }
88 }
89 
90 bool KJotsMain::queryClose()
91 {
92  return component->queryClose();
93 }
94 
95 void KJotsMain::onQuit()
96 {
97 // component->queryClose();
98  deleteLater();
99  qApp->quit();
100 }
101 
102 
KJotsMain.h
KJotsWidget::queryClose
Q_SCRIPTABLE bool queryClose()
Definition: kjotswidget.cpp:1764
KJotsWidget
Definition: kjotswidget.h:66
KJotsMain::updateCaption
void updateCaption(QString)
Definition: KJotsMain.cpp:75
QString::isEmpty
bool isEmpty() const
KJotsMain::onQuit
void onQuit()
Definition: KJotsMain.cpp:95
kjotswidget.h
KJotsMain::queryClose
bool queryClose()
Reimplemented from KMainWindow.
Definition: KJotsMain.cpp:90
QString
kjotsedit.h
kjotsbookmarks.h
kjotsbrowser.h
KJotsMain::activeAnchorChanged
void activeAnchorChanged(const QString &, const QString &)
Definition: KJotsMain.cpp:80
KJotsMain::KJotsMain
KJotsMain()
Definition: KJotsMain.cpp:50
QLatin1String
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kjots

Skip menu "kjots"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal