/* * Alabastra Project - C++ Editor writed with QT Library V.4 * Copyright (C) Igor Maculan - geocronos@gmail.com Marco Buoncristiano - marco.buoncristiano@gmail.com * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef ALDOCUMENT_H #define ALDOCUMENT_H #include #include #include #include #include #include #include #include "AlSyntax.h" #include "AlMethod.h" class AlProject; class AlDocument : public QTextDocument { Q_OBJECT private: QList alMethodList; QString filename; bool saved; QTextCursor cursor; void connect_signal(); AlProject *prj; AlSyntax *syntax; void common(); public: AlDocument(QObject*); AlDocument(AlProject*); AlDocument(); QString getFileName(); QString getShortFileName(); bool setFileName(QString); //SALVA int save(); bool save(QString); //APRI void open(QString); bool isSaved(); void refreshMethod(); QList getAlMethodList(); QString getExtension(); public slots: void setModified(bool); private slots: void documentModified(bool); signals: void fileNameChanged(const QString); void fileNameChanged(); void fileNameChanged(const QString,const QString); void modified(AlDocument*,bool); }; #endif