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

libkdegames/libkdegamesprivate

  • sources
  • kde-4.14
  • kdegames
  • libkdegames
  • libkdegamesprivate
kgamesvgdocument_p.h
Go to the documentation of this file.
1 
8 /***************************************************************************
9  * Copyright (C) 2007 Mark A. Taff <kde@marktaff.com> *
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU Library General Public License *
13  * version 2 as published by the Free Software Foundation *
14  * *
15  * This program is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18  * GNU Library General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU Library General Public *
21  * License along with this program; if not, write to the *
22  * Free Software Foundation, Inc., *
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
24  ***************************************************************************/
25 
26 #ifndef _KGAMESVGDOCUMENT_P_H_
27 #define _KGAMESVGDOCUMENT_P_H_
28 
29 
33 static const QString WSP = QLatin1String("\\s");
34 
38 static const QString WSP_ASTERISK = WSP + QLatin1String( "*");
39 
43 static const QLatin1Char COMMA = QLatin1Char( ',' );
44 
48 static const QString COMMA_WSP = QLatin1String("(?:(?:" ) + WSP + QLatin1Char( '+' ) + COMMA + QLatin1Char( '?' ) +
49  WSP + QLatin1String( "*)|(?:" ) + COMMA + WSP + QLatin1String( "*))");
50 
54 static const QString NUMBER = QLatin1String("(?:(?:[-|\\+]?\\d+(?:\\.)*\\d*(?:e)?[-|\\+]?\\d*)|(?:[-|\\+]?(?:\\.)+\\d*(?:e)?[-|\\+]?\\d*))");
55 // Do not wrap the above line!
56 
60 static const QString OPEN_PARENS = QLatin1String("\\(");
61 
65 static const QString CLOSE_PARENS = QLatin1String("\\)");
66 
70 static const QString MATRIX = QLatin1String("(matrix)" ) + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK +
71  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + COMMA_WSP +
72  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + COMMA_WSP +
73  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + COMMA_WSP +
74  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + COMMA_WSP +
75  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + COMMA_WSP +
76  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + WSP_ASTERISK + CLOSE_PARENS;
77 
81 static const QString TRANSLATE = QLatin1String("(translate)" ) + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK +
82  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) +
83  QLatin1String( "(?:" ) + COMMA_WSP + QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + QLatin1String( ")?" ) + WSP_ASTERISK + CLOSE_PARENS;
84 
88 static const QString SCALE = QLatin1String("(scale)" ) + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK +
89  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) +
90  QLatin1String( "(?:" ) + COMMA_WSP + QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + QLatin1String( ")?" ) + WSP_ASTERISK + CLOSE_PARENS;
91 
95 static const QString ROTATE = QLatin1String("(rotate)" ) + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK +
96  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + QLatin1String( "(?:" ) + COMMA_WSP +
97  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + COMMA_WSP +
98  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + QLatin1String( ")?" ) + WSP_ASTERISK + CLOSE_PARENS;
99 
103 static const QString SKEW_X = QLatin1String( "(skewX)" ) + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK +
104  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + WSP_ASTERISK + CLOSE_PARENS;
105 
109 static const QString SKEW_Y = QLatin1String("(skewY)" ) + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK +
110  QLatin1Char( '(' ) + NUMBER + QLatin1Char( ')' ) + WSP_ASTERISK + CLOSE_PARENS;
111 
115 static const QString TRANSFORM = QLatin1String("(?:" ) + MATRIX + QLatin1String( "|" ) + TRANSLATE + QLatin1String( "|" ) + SCALE + QLatin1String( "|" ) +
116  ROTATE + QLatin1String( "|" ) + SKEW_X + QLatin1String( "|" ) + SKEW_Y + QLatin1String( ")");
117 
121 static const QString TRANSFORMS = QLatin1String("(?:" ) + TRANSFORM + QLatin1String( "|" ) + QLatin1String( "(?:" ) + TRANSFORM +
122  COMMA_WSP + QLatin1String( "+)*" ) + TRANSFORM + QLatin1String( ")");
123 
124 #endif // _KGAMESVGDOCUMENT_P_H_
NUMBER
static const QString NUMBER
A regex that matches a number.
Definition: kgamesvgdocument_p.h:54
COMMA_WSP
static const QString COMMA_WSP
A regex that matches a comma or whitespace.
Definition: kgamesvgdocument_p.h:48
SCALE
static const QString SCALE
A regex that matches scale transform.
Definition: kgamesvgdocument_p.h:88
TRANSLATE
static const QString TRANSLATE
A regex that matches a translate transform.
Definition: kgamesvgdocument_p.h:81
TRANSFORMS
static const QString TRANSFORMS
A regex that matches the entire transform attribute.
Definition: kgamesvgdocument_p.h:121
TRANSFORM
static const QString TRANSFORM
A regex that matches any single transform.
Definition: kgamesvgdocument_p.h:115
QString
ROTATE
static const QString ROTATE
A regex that matches rotate transform.
Definition: kgamesvgdocument_p.h:95
QLatin1Char
WSP_ASTERISK
static const QString WSP_ASTERISK
A regex that matches zero or more whitespace.
Definition: kgamesvgdocument_p.h:38
SKEW_X
static const QString SKEW_X
A regex that matches skewX transform.
Definition: kgamesvgdocument_p.h:103
WSP
static const QString WSP
A regex that matches a single whitespace.
Definition: kgamesvgdocument_p.h:33
QLatin1String
OPEN_PARENS
static const QString OPEN_PARENS
A regex that matches opening parenthesis.
Definition: kgamesvgdocument_p.h:60
MATRIX
static const QString MATRIX
A regex that matches a matrix transform.
Definition: kgamesvgdocument_p.h:70
COMMA
static const QLatin1Char COMMA
A regex that matches a comma.
Definition: kgamesvgdocument_p.h:43
CLOSE_PARENS
static const QString CLOSE_PARENS
A regex that matches closing parenthesis.
Definition: kgamesvgdocument_p.h:65
SKEW_Y
static const QString SKEW_Y
A regex that matches skewY transform.
Definition: kgamesvgdocument_p.h:109
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:50 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdegames/libkdegamesprivate

Skip menu "libkdegames/libkdegamesprivate"
  • Main Page
  • 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