// // C++ Interface: annotationoutput // // Description: // // // Author: Andras Mantia , (C) 2005 // // Copyright: See COPYING file that comes with this distribution // // #ifndef ANNOTATIONOUTPUT_H #define ANNOTATIONOUTPUT_H #include #include /** @author Andras Mantia */ class QDomDocument; class QListViewItem; class QTimer; class KListView; class KListViewItem; class MessageOutput; enum AnnotationScope { CurrentFile = 0, AllFiles }; class AnnotationOutput : public KTabWidget { Q_OBJECT public: AnnotationOutput(QWidget *parent = 0, const char *name = 0); ~AnnotationOutput(); MessageOutput *currentFileAnnotations() const {return m_currentFileAnnotations;} KListView *allAnnotations() const {return m_allAnnotations;} void writeAnnotations(const QString &fileName, const QMap > &annotations); public slots: /** * Scans the project files to see if there were annotations added or modified outside of Quanta. The scan is done in background. */ void updateAnnotations(); void readAnnotations(); void clearAnnotations(); void insertAnnotation(uint line, const QString& fileName, const QPair& annotation); private slots: void tabChanged(QWidget *w); void allAnnotationsItemExecuted(QListViewItem *item); void yourAnnotationsItemExecuted(QListViewItem *item); void slotUpdateNextFile(); signals: void clicked(const QString& fname, int line, int col); private: /** * Updates the annotation for a file. * @param url */ void updateAnnotationForFile(const KURL& url); MessageOutput *m_currentFileAnnotations; KListView *m_allAnnotations; QDict m_annotatedFileItems; QMap m_fileNames; QMap m_lines; uint m_yourAnnotationsNum; KListView *m_yourAnnotations; QDict m_yourFileItems; QMap m_yourFileNames; QMap m_yourLines; QTimer *m_updateTimer; KURL::List m_files; uint m_fileIndex; }; #endif