File indexing completed on 2024-05-12 12:21:08
0001 // SPDX-FileCopyrightText: 2003-2022 Jesper K. Pedersen <blackie@kde.org> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-or-later 0004 0005 #ifndef VISIBLEOPTIONSMENU_H 0006 #define VISIBLEOPTIONSMENU_H 0007 0008 #include <QList> 0009 #include <QMenu> 0010 0011 class KToggleAction; 0012 class KActionCollection; 0013 0014 namespace Viewer 0015 { 0016 0017 /** 0018 * @brief The VisibleOptionsMenu lets the user choose what kind of information is shown in the InfoBox. 0019 * It is used in the context menu of the viewer. 0020 * 0021 * If any option is changed, visibleOptionsChanged() is emitted. 0022 * Changes are written directly to the global application settings. 0023 */ 0024 class VisibleOptionsMenu : public QMenu 0025 { 0026 Q_OBJECT 0027 public: 0028 VisibleOptionsMenu(QWidget *parent, KActionCollection *actions); 0029 0030 Q_SIGNALS: 0031 void visibleOptionsChanged(); 0032 0033 private Q_SLOTS: 0034 void updateState(); 0035 void toggleShowInfoBox(bool); 0036 void toggleShowCategory(bool); 0037 void toggleShowLabel(bool); 0038 void toggleShowDescription(bool); 0039 void toggleShowDate(bool); 0040 void toggleShowTime(bool); 0041 void toggleShowFilename(bool); 0042 void toggleShowEXIF(bool); 0043 void toggleShowImageSize(bool); 0044 void toggleShowRating(bool); 0045 0046 private: 0047 KToggleAction *m_showInfoBox; 0048 KToggleAction *m_showLabel; 0049 KToggleAction *m_showDescription; 0050 KToggleAction *m_showDate; 0051 KToggleAction *m_showTime; 0052 KToggleAction *m_showFileName; 0053 KToggleAction *m_showExif; 0054 KToggleAction *m_showImageSize; 0055 KToggleAction *m_showRating; 0056 QList<KToggleAction *> m_actionList; 0057 }; 0058 0059 } 0060 0061 #endif /* VISIBLEOPTIONSMENU_H */ 0062 0063 // vi:expandtab:tabstop=4 shiftwidth=4: