Kate
katevimodebar.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries and the Kate part. 00002 * 00003 * Copyright (C) 2008 Dmitry Suzdalev <dimsuz@gmail.com> 00004 * Copyright (C) 2008 Erlend Hamberg <ehamberg@gmail.com> 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public License 00017 * along with this library; see the file COPYING.LIB. If not, write to 00018 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 * Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KATE_VI_MODE_BAR_H 00023 #define KATE_VI_MODE_BAR_H 00024 00025 #include "kateviewhelpers.h" 00026 #include "kateview.h" 00027 #include "kcolorscheme.h" 00028 00029 class QLabel; 00030 class QTimer; 00031 class KateViNormalMode; 00032 class KateViInsertMode; 00033 class KateViVisualMode; 00034 00035 class KateViModeBar : public KateViewBarWidget 00036 { 00037 Q_OBJECT 00038 public: 00039 explicit KateViModeBar(QWidget* parent = 0); 00040 ~KateViModeBar(); 00041 00042 void updateViMode(ViMode mode); 00043 void updatePartialCommand(const QString &cmd); 00044 void showMessage(const QString &msg); 00045 void showErrorMessage(const QString &msg); 00046 void clearMessage(); 00047 void setForegroundColor(KColorScheme::ForegroundRole role); 00048 00049 private Q_SLOTS: 00050 void _clearMessage(); 00051 00052 private: 00053 // move to some common place? seems it may be useful for others. 00054 QString modeToString(ViMode mode) const; 00055 00056 private: 00057 QLabel* m_labelStatus; 00058 QLabel* m_labelMessage; 00059 QLabel* m_labelCommand; 00060 QTimer* m_timer; 00061 }; 00062 00063 #endif
KDE 4.6 API Reference