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

kcachegrind

  • sources
  • kde-4.12
  • kdesdk
  • kcachegrind
  • qcachegrind
configpage.h
Go to the documentation of this file.
1 /* This file is part of KCachegrind.
2  Copyright (C) 2009 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
3 
4  KCachegrind is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public
6  License as published by the Free Software Foundation, version 2.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; see the file COPYING. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 /*
20  * Base class for pages in configuration dialog
21  */
22 
23 #ifndef CONFIGPAGE_H
24 #define CONFIGPAGE_H
25 
26 #include <QString>
27 #include <QMap>
28 #include <QWidget>
29 
30 class ConfigPage: public QWidget
31 {
32 public:
33  ConfigPage(QWidget* parent, QString title, QString longTitle = QString());
34  virtual ~ConfigPage() {}
35 
36  QString title() { return _title; }
37  QString longTitle() { return _longTitle; }
38 
39  // the default implementation focuses on widget named via <names>
40  virtual void activate(QString);
41 
42  // called on OK; prohibits closing by returning false
43  // an error message to show and item name to navigate to can be set
44  virtual bool check(QString& errorMsg, QString& errorItem);
45  virtual void accept();
46 
47 protected:
48  QString inRangeError(int, int);
49 
50  QMap<QString, QWidget*> _names;
51 
52 private:
53  QString _title;
54  QString _longTitle;
55 };
56 
57 #endif // CONFIGPAGE
ConfigPage::accept
virtual void accept()
Definition: configpage.cpp:53
ConfigPage::longTitle
QString longTitle()
Definition: configpage.h:37
ConfigPage::inRangeError
QString inRangeError(int, int)
Definition: configpage.cpp:56
QWidget
ConfigPage::~ConfigPage
virtual ~ConfigPage()
Definition: configpage.h:34
ConfigPage::check
virtual bool check(QString &errorMsg, QString &errorItem)
Definition: configpage.cpp:48
ConfigPage::_names
QMap< QString, QWidget * > _names
Definition: configpage.h:50
ConfigPage::title
QString title()
Definition: configpage.h:36
ConfigPage
Definition: configpage.h:30
ConfigPage::activate
virtual void activate(QString)
Definition: configpage.cpp:42
ConfigPage::ConfigPage
ConfigPage(QWidget *parent, QString title, QString longTitle=QString())
Definition: configpage.cpp:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:03:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcachegrind

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • 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