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

palapeli/libpala

  • sources
  • kde-4.14
  • kdegames
  • palapeli
  • libpala
slicerproperty.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright 2009, 2010 Stefan Majewsky <majewsky@gmx.net>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  ***************************************************************************/
18 
19 #ifndef LIBPALA_SLICERPROPERTY_H
20 #define LIBPALA_SLICERPROPERTY_H
21 
22 #if defined(MAKE_LIBPALA) || defined(USE_LOCAL_LIBPALA)
23 # include "libpalamacros.h"
24 #else
25 # include <libpala/libpalamacros.h>
26 #endif
27 
28 #include <QtCore/QPair>
29 #include <QtCore/QVariant>
30 #include <QtCore/QVariantList>
31 
32 namespace Pala
33 {
44  class LIBPALA_EXPORT SlicerProperty
45  {
46  protected:
47  explicit SlicerProperty(QVariant::Type type, const QString& caption);
48  public:
50  virtual ~SlicerProperty();
51 
52  //The following functions belong to the interface to the Palapeli application. They are not documented because the documentation is targeted at slicer developers.
54  QString caption() const;
56  QVariantList choices() const;
58  QVariant defaultValue() const;
61  bool isAdvanced() const;
64  bool isEnabled() const;
67  QByteArray key() const;
70  void setKey(const QByteArray& key);
72  QVariant::Type type() const;
73 
76  void setAdvanced(bool advanced = true);
79  void setChoices(const QVariantList& choices);
81  void setDefaultValue(const QVariant& value);
84  void setEnabled(bool enabled);
85  private:
86  class Private;
87  Private* const p;
88  };
89 
93  class LIBPALA_EXPORT BooleanProperty : public Pala::SlicerProperty
94  {
95  public:
96  explicit BooleanProperty(const QString& caption);
97  virtual ~BooleanProperty();
98  private:
99  class Private;
100  Private* const p;
101  };
102 
106  class LIBPALA_EXPORT IntegerProperty : public Pala::SlicerProperty
107  {
108  public:
110  enum Representation { SpinBox, Slider, DefaultRepresentation = SpinBox };
111 
112  explicit IntegerProperty(const QString& caption);
113  virtual ~IntegerProperty();
114 
116  QPair<int, int> range() const;
118  Representation representation() const;
119 
121  void setRange(int min, int max);
123  void setRepresentation(Representation representation);
124  private:
125  class Private;
126  Private* const p;
127  };
128 
132  class LIBPALA_EXPORT StringProperty : public Pala::SlicerProperty
133  {
134  public:
135  explicit StringProperty(const QString& caption);
136  virtual ~StringProperty();
137  private:
138  class Private;
139  Private* const p;
140  };
141 }
142 
143 #endif // LIBPALA_SLICERPROPERTY_H
QByteArray
Pala::StringProperty
Definition: slicerproperty.h:132
Pala::IntegerProperty
Definition: slicerproperty.h:106
QString
Pala::IntegerProperty::SpinBox
Definition: slicerproperty.h:110
QPair< int, int >
Pala::BooleanProperty
Definition: slicerproperty.h:93
LIBPALA_EXPORT
#define LIBPALA_EXPORT
Definition: libpalamacros.h:28
Pala::IntegerProperty::Representation
Representation
Decides how the property is represented in the user interface of Palapeli.
Definition: slicerproperty.h:110
libpalamacros.h
Pala::SlicerProperty
Representation of a single configurable parameter of a slicing algorithm.
Definition: slicerproperty.h:44
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

palapeli/libpala

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

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

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