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

umbrello/umbrello

  • sources
  • kde-4.14
  • kdesdk
  • umbrello
  • umbrello
  • dialogs
  • pages
dialogpagebase.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * This program is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU General Public License as published by *
4  * the Free Software Foundation; either version 2 of the License, or *
5  * (at your option) any later version. *
6  * *
7  * copyright (C) 2014 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 // own header
12 #include "dialogpagebase.h"
13 
14 // qt includes
15 #include <QKeyEvent>
16 
20 DialogPageBase::DialogPageBase(QWidget *parent)
21  : QWidget(parent),
22  m_isModified(false)
23 {
24 }
25 
26 DialogPageBase::~DialogPageBase()
27 {
28 }
29 
37 bool DialogPageBase::isModified()
38 {
39  return m_isModified;
40 }
41 
46 void DialogPageBase::keyPressEvent(QKeyEvent *event)
47 {
48  // Set modified state if any text has been typed in
49  if (event->key() >= Qt::Key_Space
50  && event->key() < Qt::Key_Multi_key)
51  m_isModified = true;
52 
53  QWidget::keyPressEvent(event);
54 }
QWidget
DialogPageBase::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Handle key press event.
Definition: dialogpagebase.cpp:46
dialogpagebase.h
DialogPageBase::isModified
virtual bool isModified()
Return state if page has been modified by user.
Definition: dialogpagebase.cpp:37
DialogPageBase::~DialogPageBase
virtual ~DialogPageBase()
Definition: dialogpagebase.cpp:26
QKeyEvent::key
int key() const
DialogPageBase::DialogPageBase
DialogPageBase(QWidget *parent)
Constructor.
Definition: dialogpagebase.cpp:20
QKeyEvent
QWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
DialogPageBase::m_isModified
bool m_isModified
Definition: dialogpagebase.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • umbrello
  •   umbrello

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