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

0001 /*************************************************************************************************
0002    Copyright (C) 2015 Andreas Cord-Landwehr (cordlandwehr@kde.org)
0003                  2016 by Michel Ludwig (michel.ludwig@kdemail.net)
0004  *************************************************************************************************/
0005 
0006 /***************************************************************************
0007  *                                                                         *
0008  *   This program is free software; you can redistribute it and/or modify  *
0009  *   it under the terms of the GNU General Public License as published by  *
0010  *   the Free Software Foundation; either version 2 of the License, or     *
0011  *   (at your option) any later version.                                   *
0012  *                                                                         *
0013  ***************************************************************************/
0014 
0015 #ifndef KILESTATUSBAR_H
0016 #define KILESTATUSBAR_H
0017 
0018 #include <QStatusBar>
0019 
0020 class QLabel;
0021 class KileErrorHandler;
0022 
0023 namespace KileWidget {
0024 
0025 class StatusBar : public QStatusBar
0026 {
0027     Q_OBJECT
0028 
0029 public:
0030     explicit StatusBar(KileErrorHandler *errorHandler, QWidget *parent = Q_NULLPTR);
0031     ~StatusBar();
0032 
0033 public:
0034     void setHintText(const QString& text);
0035     void clearHintText();
0036 
0037     void setParserStatus(const QString& text);
0038     void clearParserStatus();
0039 
0040     void setLineColumn(int line, int column);
0041     void clearLineColumn();
0042 
0043     void setViewMode(const QString& text);
0044     void clearViewMode();
0045 
0046     void setSelectionMode(const QString& text);
0047     void clearSelectionMode();
0048 
0049     void reset();
0050 
0051 private:
0052     KileErrorHandler * const m_errorHandler;
0053     QLabel *m_hintTextLabel;
0054     QLabel *m_lineColumnLabel;
0055     QLabel *m_viewModeLabel;
0056     QLabel *m_selectionModeLabel;
0057     QLabel *m_parserStatusLabel;
0058 };
0059 }
0060 
0061 #endif