1
/**********************************************************************
2
** Copyright (C) 2000 Trolltech AS. All rights reserved.
4
** This file is part of Qt Designer.
6
** This file may be distributed and/or modified under the terms of the
7
** GNU General Public License version 2 as published by the Free Software
8
** Foundation and appearing in the file LICENSE.GPL included in the
9
** packaging of this file.
11
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
12
** licenses may use this file in accordance with the Qt Commercial License
13
** Agreement provided with the Software.
15
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18
** See http://www.trolltech.com/gpl/ for GPL licensing information.
19
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
20
** information about Qt Commercial License Agreements.
22
** Contact info@trolltech.com if any conditions of this licensing are
25
**********************************************************************/
31
#include "timestamp.h"
33
struct DesignerSourceFile;
37
class SourceFile : public QObject
42
SourceFile( const QString &fn, bool temp, Project *p );
45
void setText( const QString &s );
46
void setModified( bool m );
48
bool save( bool ignoreModified = FALSE );
49
bool saveAs( bool ignoreModified = FALSE );
53
Project *project() const;
56
QString fileName() const { return filename; }
57
bool isModified() const;
59
void checkTimeStamp();
61
DesignerSourceFile *iFace();
63
void setEditor( SourceEditor *e );
64
SourceEditor *editor() const { return ed; }
66
static QString createUnnamedFileName( const QString &extension );
68
bool isAccepted() const { return accepted; }
71
bool checkFileName( bool allowBreak );
76
DesignerSourceFile *iface;