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

kjots

  • sources
  • kde-4.12
  • 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 #include <Akonadi/AttributeFactory>
29 
30 #include <kicon.h>
31 
32 #include <kaction.h>
33 #include <kactioncollection.h>
34 #include <kdebug.h>
35 #include <kglobalsettings.h>
36 #include <kinputdialog.h>
37 #include <kstandardaction.h>
38 #include <kstatusbar.h>
39 
40 #include "KJotsSettings.h"
41 #include "kjotsbookmarks.h"
42 #include "kjotsedit.h"
43 #include "kjotsbrowser.h"
44 #include "kjotswidget.h"
45 #include "kjotslockattribute.h"
46 
47 #include <QApplication>
48 
49 //----------------------------------------------------------------------
50 // KJOTSMAIN
51 //----------------------------------------------------------------------
52 KJotsMain::KJotsMain()
53 {
54 
55  // Main widget
56  //
57 
58  KStandardAction::quit(this, SLOT(onQuit()), actionCollection());
59 
60  component = new KJotsWidget(this, this );
61 
62  setCentralWidget(component);
63  statusBar()->insertItem(QString(), 0, 1);
64  statusBar()->setItemAlignment(0, Qt::AlignLeft | Qt::AlignVCenter);
65 
66  connect(component, SIGNAL(activeAnchorChanged(QString,QString)),
67  SLOT(activeAnchorChanged(QString,QString)));
68 
69  setupGUI();
70  connect(component, SIGNAL(captionChanged(QString)), SLOT(updateCaption(QString)));
71 
72  Akonadi::AttributeFactory::registerAttribute<KJotsLockAttribute>();
73 
74 }
75 
79 void KJotsMain::updateCaption(QString caption)
80 {
81  setCaption(caption);
82 }
83 
84 void KJotsMain::activeAnchorChanged(const QString &anchorTarget, const QString &anchorText)
85 {
86  if (!anchorTarget.isEmpty())
87  {
88  statusBar()->changeItem(anchorText + QLatin1String(" -> ") + anchorTarget, 0);
89  } else {
90  statusBar()->changeItem(QString(), 0);
91  }
92 }
93 
94 bool KJotsMain::queryClose()
95 {
96  return component->queryClose();
97 }
98 
99 void KJotsMain::onQuit()
100 {
101 // component->queryClose();
102  deleteLater();
103  qApp->quit();
104 }
105 
106 
107 #include "KJotsMain.moc"
KJotsMain.h
KJotsWidget::queryClose
Q_SCRIPTABLE bool queryClose()
Definition: kjotswidget.cpp:1765
KJotsWidget
Definition: kjotswidget.h:67
KJotsMain::updateCaption
void updateCaption(QString)
Definition: KJotsMain.cpp:79
KJotsMain::onQuit
void onQuit()
Definition: KJotsMain.cpp:99
kjotswidget.h
KJotsMain::queryClose
bool queryClose()
Reimplemented from KMainWindow.
Definition: KJotsMain.cpp:94
kjotsedit.h
kjotsbookmarks.h
kjotsbrowser.h
KJotsMain::activeAnchorChanged
void activeAnchorChanged(const QString &, const QString &)
Definition: KJotsMain.cpp:84
KJotsMain::KJotsMain
KJotsMain()
Definition: KJotsMain.cpp:52
kjotslockattribute.h
KJotsSettings.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:39 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

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