• 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
slicer.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_SLICER_H
20 #define LIBPALA_SLICER_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/QObject>
29 #include <QtCore/QVariant>
30 
31 namespace Pala
32 {
33  class SlicerJob;
34  class SlicerMode;
35  class SlicerProperty;
36  class SlicerPropertySet;
37 
58  class LIBPALA_EXPORT Slicer : public QObject
59  {
60  Q_OBJECT
61  public:
67  enum SlicerFlag
68  {
69  NoFlags = 0x0,
70  AllowFullTransparency = 0x1
71  };
72  Q_DECLARE_FLAGS(SlicerFlags, SlicerFlag)
73 
74 
78  explicit Slicer(QObject* parent = 0, const QVariantList& args = QVariantList());
80  virtual ~Slicer();
81 
82  //The following function belongs to the interface to the Palapeli application. It is not documented because the documentation is targeted at slicer developers.
85  QList<const Pala::SlicerMode*> modes() const;
88  QMap<QByteArray, const Pala::SlicerProperty*> properties() const;
91  QList<const Pala::SlicerProperty*> propertyList() const; //BIC: rename to properties()
93  SlicerFlags flags() const;
95  bool process(Pala::SlicerJob* job); //a wrapper function for Pala::Slicer::run
96  //BIC: constify method
97 
98  //This class is the only interface that slicers can use to communicate with Palapeli, and it is only instantiated very few times (one instance per slicer plugin), so it should be reasonable to reserve some space in the virtual table for future additions.
99  RESERVE_VIRTUAL_5
100  protected:
104  void addProperty(const QByteArray& key, Pala::SlicerProperty* property);
105  //BIC: make interface similar to setMode()
110  void addMode(Pala::SlicerMode* mode);
111 
112  friend class SlicerPropertySet;
114  void setFlags(SlicerFlags flags);
115 
122  virtual bool run(Pala::SlicerJob* job) = 0;
123  //BIC: constify method
124  private:
125  class Private;
126  Private* const p;
127  };
128 }
129 
130 Q_DECLARE_OPERATORS_FOR_FLAGS(Pala::Slicer::SlicerFlags)
131 
132 #endif // LIBPALA_SLICER_H
QByteArray
QMap
Pala::Slicer::SlicerFlag
SlicerFlag
Behavioral flags of a slicer.
Definition: slicer.h:67
Pala::SlicerJob
Representation of a single run of a slicing algorithm.
Definition: slicerjob.h:46
Pala::SlicerMode
Representation of an operational mode of a slicing algorithm.
Definition: slicermode.h:46
Pala::SlicerPropertySet
Representation of a set of configurable parameters of a slicing algorithm.
Definition: slicerpropertyset.h:49
QObject
QList
Pala::Slicer
Representation of a slicing algorithm.
Definition: slicer.h:58
LIBPALA_EXPORT
#define LIBPALA_EXPORT
Definition: libpalamacros.h:28
libpalamacros.h
Pala::SlicerProperty
Representation of a single configurable parameter of a slicing algorithm.
Definition: slicerproperty.h:44
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