1
// This file is part of Kig, a KDE program for Interactive Geometry...
2
// Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
3
// Copyright (C) 2006 Pino Toscano <toscano.pino@tiscali.it>
5
// This program is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU General Public License
7
// as published by the Free Software Foundation; either version 2
8
// of the License, or (at your option) any later version.
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20
#include "cabri-utils.h"
22
#include "cabri-filter.h"
31
#define KIG_CABRI_FILTER_PARSE_ERROR \
33
QString locs = i18n( "An error was encountered at line %1 in file %2.", \
34
__LINE__, __FILE__ ); \
35
m_filter->publicParseError( file, locs ); \
39
static std::map<QString, QColor> colormap;
40
static std::map<QString, QColor> colormap_v12;
41
typedef std::map<QString, QColor>::iterator cmit;
44
* Gives the default color for an object, in case of an object come
45
* with no color specified; it's exactly what Cabri 1.2 does.
47
static QColor defaultColorForObject( const QByteArray& type )
49
if ( type == "Line" || type == "Ray" || type == "Seg" )
51
if ( type == "Pt" || type == "Pt/" || type == "Locus" )
56
return QColor( 254, 0, 255 );
60
return QColor( 0, 0, 128 );
61
if ( type == "Text" || type == "Angle" )
67
static bool extractValuesFromString( const QString& str, std::vector<int>& vec )
73
// extracting the digits
74
QRegExp ids( "\\d+" );
76
while ( ( pos = ids.indexIn( tmp ) ) > -1 )
78
vec.push_back( ids.cap( 0 ).toInt( &ok ) );
79
if ( !ok ) return false;
80
tmp.remove( pos, ids.matchedLength() );
89
QString readLine( QFile& file )
91
QString ret = file.readLine( 10000L );
92
if ( !ret.isEmpty() && ret[ret.length() - 1] == '\n' )
93
ret.truncate( ret.length() - 1 );
94
if ( !ret.isEmpty() && ret[ret.length() - 1] == '\r' )
95
ret.truncate( ret.length() - 1 );
99
QString readText( QFile& f, const QString& s, const QString& sep )
102
if ( !line.startsWith( '\"' ) || f.atEnd() )
103
// don't blame on failing here
108
while ( tmp.at( tmp.length() - 1 ) != '"' )
113
QString ret = text.mid( 1, text.length() - 2 );
115
kDebug() << "+++++++++ text: \"" << ret << "\"";
122
CabriObject::CabriObject()
123
: id( 0 ), thick( 1 ), lineSegLength( 0 ), lineSegSplit( 0 ), visible( true ),
124
intersectionId( 0 ), ticks( 0 ), side( 0 ), textRect( Rect::invalidRect() ),
125
gonio( CabriNS::CG_Deg )
129
CabriObject_v10::CabriObject_v10()
130
: CabriObject(), specialAppearanceSwitch( 0 ), fixed( false )
134
CabriObject_v12::CabriObject_v12()
135
: CabriObject(), pointStyle( 1 )
139
CabriReader::CabriReader( const KigFilterCabri* filter )
145
CabriReader::~CabriReader()
149
void CabriReader::initColorMap()
151
static bool colors_initialized = false;
152
if ( !colors_initialized )
154
colors_initialized = true;
155
colormap[ "R" ] = Qt::red;
156
colormap[ "O" ] = Qt::magenta;
157
colormap[ "Y" ] = Qt::yellow;
158
colormap[ "P" ] = Qt::darkMagenta;
159
colormap[ "V" ] = Qt::darkBlue;
160
colormap[ "Bl" ] = Qt::blue;
161
colormap[ "lBl" ] = Qt::cyan;
162
colormap[ "G" ] = Qt::green;
163
colormap[ "dG" ] = Qt::darkGreen;
164
colormap[ "Br" ] = QColor( 165, 42, 42 );
165
colormap[ "dBr" ] = QColor( 128, 128, 0 );
166
colormap[ "lGr" ] = Qt::lightGray;
167
colormap[ "Gr" ] = Qt::gray;
168
colormap[ "dGr" ] = Qt::darkGray;
169
colormap[ "B" ] = Qt::black;
170
colormap[ "W" ] = Qt::white;
174
QColor CabriReader::translateColor( const QString& s )
177
cmit it = colormap.find( s );
178
if ( it != colormap.end() ) return (*it).second;
180
kDebug() << "unknown color: " << s;
185
CabriReader_v10::CabriReader_v10( const KigFilterCabri* filter )
186
: CabriReader( filter )
190
CabriReader_v10::~CabriReader_v10()
194
bool CabriReader_v10::readWindowMetrics( QFile& f )
196
QString file = f.fileName();
198
QString line = CabriNS::readLine( f );
199
QRegExp first( "^Window center x: (.+) y: (.+) Window size x: (.+) y: (.+)$" );
200
if ( !first.exactMatch( line ) )
201
KIG_CABRI_FILTER_PARSE_ERROR;
203
line = CabriNS::readLine( f );
208
CabriObject* CabriReader_v10::readObject( QFile& f )
210
CabriObject_v10* myobj = new CabriObject_v10();
212
QString file = f.fileName();
217
QString line1 = CabriNS::readLine( f );
218
QRegExp namelinere( "^\"([^\"]+)\", NP: ([\\d-]+), ([\\d-]+), NS: (\\d+), (\\d+)$" );
219
if ( namelinere.exactMatch( line1 ) )
221
tmp = namelinere.cap( 1 );
224
line1 = CabriNS::readLine( f );
227
QRegExp firstlinere( "^([^:]+): ([^,]+), ([^,]+), CN:([^,]*), VN:(.*)$" );
228
if ( ! firstlinere.exactMatch( line1 ) )
229
KIG_CABRI_FILTER_PARSE_ERROR;
231
tmp = firstlinere.cap( 1 );
232
myobj->id = tmp.toUInt( &ok );
233
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
235
tmp = firstlinere.cap( 2 );
236
myobj->type = tmp.toLatin1();
238
tmp = firstlinere.cap( 3 );
239
myobj->specification = tmp.toInt( &ok );
240
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
241
// for "Eq/Co" this is presumably what we want:
242
// 0: x coordinate (of point)
243
// 1: y coordinate (of point)
245
tmp = firstlinere.cap( 4 );
246
uint numberOfParents = tmp.toUInt( &ok );
247
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
249
tmp = firstlinere.cap( 5 );
250
// i have no idea what this number means..
252
QString line2 = CabriNS::readLine( f );
253
QRegExp secondlinere( "^([^,]+), ([^,]+), ([^,]+), DS:([^ ]+) ([^,]+), GT:([^,]+), ([^,]+), (.*)$" );
254
QRegExp secondlinere2( "^([^,]+), ([^,]+), NbD:([^,]+), ([^,]+), ([^,]+), GT:([^,]+), ([^,]+), (.*)$" );
255
if ( secondlinere.exactMatch( line2 ) )
257
tmp = secondlinere.cap( 1 );
258
myobj->color = translateColor( tmp );
260
tmp = secondlinere.cap( 2 );
261
myobj->fillColor = translateColor( tmp );
263
tmp = secondlinere.cap( 3 );
264
myobj->thick = tmp == "t" ? 1 : tmp == "tT" ? 2 : 3;
266
tmp = secondlinere.cap( 4 );
267
myobj->lineSegLength = tmp.toInt( &ok );
268
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
270
tmp = secondlinere.cap( 5 );
271
myobj->lineSegSplit = tmp.toInt( &ok );
272
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
274
tmp = secondlinere.cap( 6 );
275
myobj->specialAppearanceSwitch = tmp.toInt( &ok );
276
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
278
tmp = secondlinere.cap( 7 );
279
myobj->visible = tmp == "V";
281
tmp = secondlinere.cap( 8 );
282
myobj->fixed = tmp == "St";
284
else if ( secondlinere2.exactMatch( line2 ) ) // e.g. for AngVal
286
tmp = secondlinere2.cap( 1 );
287
myobj->color = translateColor( tmp );
289
tmp = secondlinere2.cap( 2 );
290
myobj->fillColor = translateColor( tmp );
292
// 3: e.g. "NbD:129" what is the meaning?
295
tmp = secondlinere2.cap( 5 );
297
myobj->gonio = CabriNS::CG_Deg;
299
tmp = secondlinere2.cap( 6 );
300
myobj->specialAppearanceSwitch = tmp.toInt( &ok );
301
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
303
tmp = secondlinere2.cap( 7 );
304
myobj->visible = tmp == "V";
306
tmp = secondlinere2.cap( 8 );
307
myobj->fixed = tmp == "St";
311
KIG_CABRI_FILTER_PARSE_ERROR;
313
QString line3 = CabriNS::readLine( f );
314
QRegExp thirdlinere( "^(Const: ([^,]*),? ?)?(Val: ([^,]*)(,(.*))?)?$" );
315
if ( ! thirdlinere.exactMatch( line3 ) )
316
KIG_CABRI_FILTER_PARSE_ERROR;
318
tmp = thirdlinere.cap( 2 );
319
const QStringList parentsids = tmp.split( ' ', QString::SkipEmptyParts );
320
for ( QStringList::const_iterator i = parentsids.begin();
321
i != parentsids.end(); ++i )
323
myobj->parents.push_back( ( *i ).toInt( &ok ) );
324
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
326
if ( myobj->parents.size() != numberOfParents )
327
KIG_CABRI_FILTER_PARSE_ERROR;
329
tmp = thirdlinere.cap( 4 );
330
const QStringList valIds = tmp.split( ' ', QString::SkipEmptyParts );
331
for ( QStringList::const_iterator i = valIds.begin();
332
i != valIds.end(); ++i )
334
myobj->data.push_back( ( *i ).toDouble( &ok ) );
335
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
338
QString thirdlineextra = thirdlinere.cap( 6 );
339
if ( myobj->type == "Text" || myobj->type == "Formula" )
341
QRegExp textMetrics( "TP: *[\\s]*([^,]+), *[\\s]*([^,]+), *TS:[\\s]*([^,]+), *[\\s]*([^,]+)" );
342
if ( textMetrics.indexIn( thirdlineextra ) != -1 )
344
double xa = textMetrics.cap( 1 ).toDouble( &ok );
345
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
346
double ya = textMetrics.cap( 2 ).toDouble( &ok );
347
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
348
double tw = textMetrics.cap( 3 ).toDouble( &ok );
349
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
350
double th = textMetrics.cap( 4 ).toDouble( &ok );
351
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
352
myobj->textRect = Rect( xa, ya, tw, th );
354
QString textline = CabriNS::readLine( f );
355
if ( textline.isEmpty() )
356
KIG_CABRI_FILTER_PARSE_ERROR;
357
if ( myobj->type == "Formula" )
359
// Just hope there is no escaping!
360
myobj->text = textline;
363
myobj->text = CabriNS::readText( f, textline, "\n" );
365
// Hack: extracting substitution arguments from the parents list
366
// and inserting them into the "incs" vector
367
// under the assumption that the required parents are the last
368
// in the arguments list (in forward order)
369
// note that we do not check for special escaping of the symbols
371
int count = myobj->text.count( "\"#" );
372
int parentsnum = myobj->parents.size();
373
for ( int i = parentsnum - count; i < parentsnum; ++i )
374
myobj->incs.push_back( myobj->parents[i] );
377
QString line4 = CabriNS::readLine( f );
378
if ( !line4.isEmpty() )
380
QRegExp fontlinere( "^p: (\\d+), ([^,]+), S: (\\d+) C: (\\d+) Fa: (\\d+)$" );
381
if ( !fontlinere.exactMatch( line4 ) )
382
KIG_CABRI_FILTER_PARSE_ERROR;
384
line4 = CabriNS::readLine( f );
389
// << "id = " << myobj->id << endl
390
// << "type = " << myobj->type << endl
391
// << "numberOfParents = " << numberOfParents << endl
392
// << "color = " << myobj->color.name() << endl
393
// << "fillcolor = " << myobj->fillColor.name() << endl
394
// << "thick = " << myobj->thick << endl
395
// << "lineseglength = " << myobj->lineSegLength << endl
396
// << "linesegsplit = " << myobj->lineSegSplit << endl
397
// << "specialAppearanceSwitch = " << myobj->specialAppearanceSwitch << endl
398
// << "visible = " << myobj->visible << endl
399
// << "fixed = " << myobj->fixed << endl
400
// << "parents =" << endl;
401
// for ( std::vector<int>::iterator i = myobj->parents.begin(); i != myobj->parents.end(); ++i )
402
// kDebug() << " " << *i;
403
// kDebug() << "vals = ";
404
// for ( std::vector<double>::iterator i = myobj->data.begin(); i != myobj->data.end(); ++i )
405
// kDebug() << " " << *i;
410
void CabriReader_v10::decodeStyle( CabriObject* obj, Qt::PenStyle& ps, int& pointType )
412
CabriObject_v10* myobj = (CabriObject_v10*)obj;
414
if ( ( myobj->type == "Pt" ) || ( myobj->type == "Pt/" ) )
416
switch ( myobj->specialAppearanceSwitch )
445
if ( ( myobj->lineSegLength > 1 ) && ( myobj->lineSegLength < 6 ) &&
446
( myobj->lineSegSplit > 1 ) && ( myobj->lineSegSplit <= 10 ) )
448
else if ( ( myobj->lineSegLength >= 6 ) && ( myobj->lineSegSplit > 10 ) )
453
CabriReader_v12::CabriReader_v12( const KigFilterCabri* filter )
454
: CabriReader( filter )
459
CabriReader_v12::~CabriReader_v12()
463
void CabriReader_v12::initColorMap()
465
static bool colors_initialized = false;
466
if ( !colors_initialized )
468
colors_initialized = true;
469
CabriReader::initColorMap();
470
colormap_v12 = colormap;
471
colormap_v12[ "dkg" ] = QColor( 0, 100, 0 );
472
colormap_v12[ "old" ] = QColor( 107, 142, 35 );
473
colormap_v12[ "olv" ] = QColor( 128, 128, 0 );
474
colormap_v12[ "lig" ] = QColor( 50, 205, 50 );
475
colormap_v12[ "gry" ] = QColor( 173, 255, 47 );
476
colormap_v12[ "gor" ] = QColor( 218, 165, 32 );
477
colormap_v12[ "msg" ] = QColor( 0, 250, 154 );
478
colormap_v12[ "spg" ] = QColor( 0, 255, 127 );
479
colormap_v12[ "pag" ] = QColor( 152, 251, 152 );
480
colormap_v12[ "kki" ] = QColor( 240, 230, 140 );
481
colormap_v12[ "O" ] = QColor( 255, 140, 0 );
482
colormap_v12[ "Br" ] = QColor( 165, 42, 42 );
483
colormap_v12[ "tea" ] = QColor( 0, 128, 128 );
484
colormap_v12[ "pat" ] = QColor( 175, 238, 238 );
485
colormap_v12[ "ltp" ] = QColor( 255, 182, 193 );
486
colormap_v12[ "dBr" ] = QColor( 128, 0, 0 );
487
colormap_v12[ "lsg" ] = QColor( 32, 178, 170 );
488
colormap_v12[ "dob" ] = QColor( 30, 144, 255 );
489
colormap_v12[ "skb" ] = QColor( 135, 206, 235 );
490
colormap_v12[ "plm" ] = QColor( 221, 160, 221 );
491
colormap_v12[ "dep" ] = QColor( 255, 20, 147 );
492
colormap_v12[ "crs" ] = QColor( 220, 20, 60 );
493
colormap_v12[ "rob" ] = QColor( 65, 105, 225 );
494
colormap_v12[ "blv" ] = QColor( 138, 43, 226 );
495
colormap_v12[ "ma" ] = QColor( 254, 0, 255 );
496
colormap_v12[ "mvr" ] = QColor( 199, 21, 133 );
497
colormap_v12[ "ind" ] = QColor( 75, 0, 130 );
498
colormap_v12[ "meo" ] = QColor( 186, 85, 211 );
499
colormap_v12[ "Gr" ] = QColor( 128, 128, 128 );
500
colormap_v12[ "dGr" ] = QColor( 64, 64, 64 );
504
bool CabriReader_v12::readWindowMetrics( QFile& f )
506
QString file = f.fileName();
508
QString line = CabriNS::readLine( f );
509
QRegExp first( "^Window center x: (.+) y: (.+) Window size x: (.+) y: (.+)$" );
510
if ( !first.exactMatch( line ) )
511
KIG_CABRI_FILTER_PARSE_ERROR;
513
QString line2 = CabriNS::readLine( f );
514
QRegExp second( "^Resolution: (\\d+) ppc$" );
515
if ( !second.exactMatch( line2 ) )
516
KIG_CABRI_FILTER_PARSE_ERROR;
518
line = CabriNS::readLine( f );
523
CabriObject* CabriReader_v12::readObject( QFile& f )
525
CabriObject_v12* myobj = new CabriObject_v12();
527
QString file = f.fileName();
528
QString line = CabriNS::readLine( f );
531
kDebug() << "+++++++++ line: \"" << line << "\"";
533
QRegExp firstlinere( "^([^:]+): ([^,]+), (Const: [,0-9\\s]+)?(int ind:([^,]+),\\s)?(cart, )?(side:(\\d+), )?(inc\\.elmts: ([,0-9\\s]+))?(axis:(x|y), )?(on mark, )?(Val: ([^,]+))?(.*)$" );
534
if ( !firstlinere.exactMatch( line ) )
535
KIG_CABRI_FILTER_PARSE_ERROR;
541
tmp = firstlinere.cap( 1 );
542
myobj->id = tmp.toUInt( &ok );
543
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
546
tmp = firstlinere.cap( 2 );
547
myobj->type = tmp.toLatin1();
550
tmp = firstlinere.cap( 3 );
551
if ( !extractValuesFromString( tmp, myobj->parents ) )
552
KIG_CABRI_FILTER_PARSE_ERROR;
555
tmp = firstlinere.cap( 15 );
556
const QStringList valIds = tmp.split( ' ', QString::SkipEmptyParts );
557
for ( QStringList::const_iterator i = valIds.begin(); i != valIds.end(); ++i )
559
myobj->data.push_back( ( *i ).toDouble( &ok ) );
560
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
563
// intersection id (if present)
564
tmp = firstlinere.cap( 5 );
565
if ( !tmp.isEmpty() )
567
long intId = tmp.toLong( &ok, 16 );
568
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
570
kDebug() << "+++++++++ intId: " << intId;
572
if ( intId == 0 ) myobj->intersectionId = -1;
573
else if ( intId == 0x10000 ) myobj->intersectionId = 1;
574
else KIG_CABRI_FILTER_PARSE_ERROR;
577
// side of a polygon (if present)
578
tmp = firstlinere.cap( 8 );
579
if ( !tmp.isEmpty() )
581
myobj->side = tmp.toInt( &ok );
582
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
585
// inc.elements (if present)
586
tmp = firstlinere.cap( 10 );
587
if ( !extractValuesFromString( tmp, myobj->incs ) )
588
KIG_CABRI_FILTER_PARSE_ERROR;
590
line = CabriNS::readLine( f );
592
QRegExp textMetrics( "^TP:[\\s]*([^,]+),[\\s]*([^,]+), TS:[\\s]*([^,]+),[\\s]*([^,]+)$" );
593
bool freeText = false;
594
while ( !line.isEmpty() )
596
if ( line.startsWith( '\"' ) )
598
QString txt = CabriNS::readText( f, line );
599
if ( myobj->type != "Text" )
604
else if ( line.startsWith( "NbD:" ) )
608
else if ( textMetrics.exactMatch( line ) )
610
double xa = textMetrics.cap( 1 ).toDouble( &ok );
611
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
612
double ya = textMetrics.cap( 2 ).toDouble( &ok );
613
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
614
double tw = textMetrics.cap( 3 ).toDouble( &ok );
615
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
616
double th = textMetrics.cap( 4 ).toDouble( &ok );
617
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
618
myobj->textRect = Rect( xa, ya, tw, th );
622
if ( !freeText && myobj->type == "Formula" )
628
readStyles( file, line, myobj );
631
line = CabriNS::readLine( f );
635
if ( !myobj->color.isValid() )
636
myobj->color = defaultColorForObject( myobj->type );
641
void CabriReader_v12::decodeStyle( CabriObject* obj, Qt::PenStyle& ps, int& pointType )
643
CabriObject_v12* myobj = (CabriObject_v12*)obj;
645
if ( ( myobj->type == "Pt" ) || ( myobj->type == "Pt/" ) )
647
// different sizes for points..
649
switch ( myobj->pointStyle )
679
if ( ( myobj->lineSegLength > 1 ) && ( myobj->lineSegLength < 6 ) &&
680
( myobj->lineSegSplit > 1 ) && ( myobj->lineSegSplit <= 10 ) )
682
else if ( ( myobj->lineSegLength >= 6 ) && ( myobj->lineSegSplit > 10 ) )
687
QColor CabriReader_v12::translateColor( const QString& s )
690
cmit it = colormap_v12.find( s );
691
if ( it != colormap_v12.end() ) return (*it).second;
693
kDebug() << "unknown color: " << s;
694
return CabriReader::translateColor( s );
697
bool CabriReader_v12::readStyles( const QString& file, const QString& line, CabriObject_v12* myobj )
700
kDebug() << ">>>>>>>>> style line: \"" << line << "\"";
702
QStringList styles = line.split( ", ", QString::SkipEmptyParts );
704
for ( QStringList::iterator it = styles.begin(); it != styles.end(); ++it )
706
if ( (*it) == "invisible" )
708
myobj->visible = false;
710
else if ( (*it).startsWith( "DS:" ) )
712
QRegExp ticks( "DS:(\\d+)\\s(\\d+)" );
713
if ( ticks.exactMatch( (*it) ) )
715
myobj->lineSegLength = ticks.cap( 1 ).toInt( &ok );
716
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
717
myobj->lineSegSplit = ticks.cap( 2 ).toInt( &ok );
718
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
722
else if ( (*it).startsWith( "color:" ) )
724
QString color = (*it).remove( 0, 6 );
725
myobj->color = translateColor( color );
727
else if ( (*it).startsWith( "fill color:" ) )
729
QString color = (*it).remove( 0, 11 );
730
myobj->fillColor = translateColor( color );
733
else if ( (*it) == "thicker" )
737
else if ( (*it) == "thick" )
742
else if ( (*it) == "1x1" )
744
myobj->pointStyle = 0;
746
else if ( (*it) == "CIRCLE" )
748
myobj->pointStyle = 2;
750
else if ( (*it) == "TIMES" )
752
myobj->pointStyle = 3;
754
else if ( (*it) == "PLUS" )
756
myobj->pointStyle = 4;
758
// goniometry systems
759
else if ( (*it) == "deg" )
761
myobj->gonio = CabriNS::CG_Deg;
764
else if ( (*it).startsWith( "marks nb:" ) )
766
QString strticks = (*it).remove( 0, 9 );
767
myobj->ticks = strticks.toInt( &ok );
768
if ( !ok ) KIG_CABRI_FILTER_PARSE_ERROR;
773
kDebug() << ">>>>>>>>> UNKNOWN STYLE STRING: \"" << *it << "\"";