• 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
slicerjob.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright 2009 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_SLICERJOB_H
20 #define LIBPALA_SLICERJOB_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/QMap>
29 #include <QtCore/QPoint>
30 #include <QtCore/QVariant>
31 #include <QtGui/QImage>
32 
33 namespace Pala
34 {
35  class Slicer;
36  class SlicerMode;
37 
46  class LIBPALA_EXPORT SlicerJob
47  {
48  public:
50  explicit SlicerJob(const QImage& image, const QMap<QByteArray, QVariant>& args);
52  virtual ~SlicerJob();
53 
55  QVariant argument(const QByteArray& key) const;
57  QImage image() const;
59  const Pala::SlicerMode* mode() const;
60 
61  //The following functions belong to the interface to the Palapeli application. They are not documented because the documentation is targeted at slicer developers.
63  QMap<int, QImage> pieces() const;
65  QMap<int, QPoint> pieceOffsets() const;
67  QList<QPair<int, int> > relations() const;
69  void setMode(const Pala::SlicerMode* mode);
70 
78  void addPiece(int pieceID, const QImage& image, const QPoint& offset = QPoint());
86  void addPieceFromMask(int pieceID, const QImage& mask, const QPoint& offset = QPoint());
91  void addRelation(int pieceID1, int pieceID2);
92  protected:
94  void respectSlicerFlags(int flags);
95  friend class Slicer;
96  private:
97  class Private;
98  Private* const p;
99  };
100 }
101 
102 #endif // LIBPALA_SLICERJOB_H
QByteArray
QMap< QByteArray, QVariant >
QPoint
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
QList
Pala::Slicer
Representation of a slicing algorithm.
Definition: slicer.h:58
QImage
LIBPALA_EXPORT
#define LIBPALA_EXPORT
Definition: libpalamacros.h:28
libpalamacros.h
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