source: trunk/tools/designer/plugins/kdevdlg/kdevdlg2ui.h

Last change on this file was 197, checked in by rudi, 14 years ago

Added QtDesigner

File size: 2.7 KB
Line 
1/**********************************************************************
2**
3** Copyright (C) 2005-2007 Trolltech ASA. All rights reserved.
4**
5** This file is part of Qt Designer
6**
7** This file may be distributed and/or modified under the terms of the
8** GNU General Public License version 2 as published by the Free Software
9** Foundation and appearing in the file LICENSE.GPL included in the
10** packaging of this file.
11**
12** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
13** licenses may use this file in accordance with the Qt Commercial License
14** Agreement provided with the Software.
15**
16** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
17** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18**
19** See http://www.trolltech.com/gpl/ for GPL licensing information.
20** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
21** information about Qt Commercial License Agreements.
22**
23** Contact info@trolltech.com if any conditions of this licensing are
24** not clear to you.
25**
26**********************************************************************/
27
28#ifndef KDEVDLG2UI_H
29#define KDEVDLG2UI_H
30
31#include <qtextstream.h>
32#include <qfile.h>
33#include <qstringlist.h>
34
35class KDEVDLG2UI
36{
37public:
38 KDEVDLG2UI( QTextStream* input, const QString& name = "dialog" );
39 ~KDEVDLG2UI();
40
41 bool parse();
42 bool parse ( QStringList& get );
43
44 QStringList targetFiles;
45
46protected:
47
48 bool writeDialog( const QString& name );
49
50 QString className;
51 QString line;
52 QTextStream *in;
53 QStringList target;
54
55 void cleanString( QString* text );
56
57 void indent();
58 void undent();
59 void wi();
60
61 void writeClass( const QString& name );
62 void writeCString( const QString& name, const QString& value );
63 void writeString( const QString& name, const QString& value );
64 void writeRect( const QString& name, int x, int y, int w, int h );
65 void writeFont( const QString& family, int pointsize );
66 void writeBool( const QString& name, bool value );
67 void writeNumber( const QString& name, int value );
68 void writeEnum( const QString& name, const QString& value );
69 void writeSet( const QString& name, const QString& value );
70 void writeItem( const QString& name, const QString& value );
71 void writeColumn( const QString& name, const QString& value );
72 void writeColor( const QString& name, const QString& value );
73 void writeStyles( const QStringList styles, bool isFrame );
74 void writeWidgetStart( const QString& qclass );
75 void writeWidgetEnd();
76
77private:
78 int indentation;
79 bool writeToFile;
80 QTextStream* out;
81};
82
83#endif
Note: See TracBrowser for help on using the repository browser.