File indexing completed on 2024-04-28 16:26:25

0001 /***************************************************************************
0002     begin                : Tuesday Nov 1 2005
0003     copyright            : (C) 2005 by Thomas Braun
0004     email                : thomas.braun@virtuell-zuhause.de
0005  ***************************************************************************/
0006 
0007 /***************************************************************************
0008  *                                                                         *
0009  *   This program is free software; you can redistribute it and/or modify  *
0010  *   it under the terms of the GNU General Public License as published by  *
0011  *   the Free Software Foundation; either version 2 of the License, or     *
0012  *   (at your option) any later version.                                   *
0013  *                                                                         *
0014  ***************************************************************************/
0015 
0016 #ifndef STATISTICSDIALOG_H
0017 #define STATISTICSDIALOG_H
0018 
0019 #include "kiledocmanager.h"
0020 #include "documentinfo.h"
0021 #include <KPageDialog>
0022 #include <QMap>
0023 
0024 class KileProject;
0025 
0026 namespace KileWidget {
0027 class StatisticsWidget;
0028 }
0029 
0030 namespace KileDialog {
0031 
0032 class StatisticsDialog : public KPageDialog
0033 {
0034 public:
0035     StatisticsDialog(KileProject *project, KileDocument::TextInfo* docinfo,
0036                      QWidget* parent = Q_NULLPTR, KTextEditor::View *view = Q_NULLPTR,
0037                      const QString &caption = QString());
0038     ~StatisticsDialog();
0039 
0040 private:
0041     void fillWidget(const long* stats, KileWidget::StatisticsWidget* widget);
0042     void convertText(QString* text, bool forLaTeX);
0043 
0044     KileProject *m_project;
0045     KileDocument::TextInfo *m_docinfo;
0046     KTextEditor::View *m_view;
0047     long *m_summarystats;
0048     bool m_hasSelection;
0049     bool m_notAllFilesOpenWarning;
0050     QMap<KPageWidgetItem*, KileWidget::StatisticsWidget*> m_pagetowidget;
0051     QMap<KPageWidgetItem*, QString> m_pagetoname;
0052 };
0053 
0054 }
0055 
0056 #endif