Simple manual page reader in Qt
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

63 lines
1.8 KiB

/*
* Copyright (C) 2017-2019 David Sugar <tychosoft@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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef STATUSBAR_HPP_
#define STATUSBAR_HPP_
#include <QObject>
#include <QStatusBar>
#include <QMenu>
#include <QMenuBar>
#include <QShortcut>
#include "compiler.hpp"
class Statusbar final : public QWidget
{
Q_OBJECT
Q_DISABLE_COPY(Statusbar)
public:
Statusbar(QWidget *parent, QStatusBar *bar, bool showDisabled = false);
void disableSearch();
void enableSearch();
void clearIndicators();
void enableSettings();
void disableSettings();
static inline Statusbar *instance() {
return Instance;
}
private:
QShortcut *f3Key, *f5Key, *f6Key, *f8Key, *refreshKey, *findKey, *closeKey;
unsigned visibleIndicators;
bool visibleDisabled;
static Statusbar *Instance;
};
/*!
* Status bar manager. The status bar is at the bottom of the main window.
* This is used both to show error messages/notices, and to manage the visual
* indicators for shortcut function keys, which are shown and enabled based on
* the state of the main tab view. This also provides all global application
* shortcuts.
* \file statusbar.hpp
*/
#endif