File indexing completed on 2024-04-28 15:40:12

0001 // SPDX-FileCopyrightText: 2003-2022 Jesper K. Pedersen <blackie@kde.org>
0002 //
0003 // SPDX-License-Identifier: GPL-2.0-or-later
0004 
0005 #ifndef DIRTYINDICATOR_H
0006 #define DIRTYINDICATOR_H
0007 
0008 #include <qlabel.h>
0009 #include <qpixmap.h>
0010 
0011 namespace MainWindow
0012 {
0013 class Window;
0014 
0015 class DirtyIndicator : public QLabel
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     static void markDirty();
0021     static void suppressMarkDirty(bool state);
0022 
0023 public Q_SLOTS:
0024     void markDirtySlot();
0025 
0026 Q_SIGNALS:
0027     void dirty();
0028 
0029 private:
0030     friend class StatusBar;
0031     friend class Window;
0032     DirtyIndicator(QWidget *parent);
0033     void autoSaved();
0034     void saved();
0035     bool isSaveDirty() const;
0036     bool isAutoSaveDirty() const;
0037 
0038     QPixmap m_dirtyPix;
0039     static bool s_autoSaveDirty;
0040     static bool s_saveDirty;
0041 
0042     static bool s_suppressMarkDirty;
0043 };
0044 
0045 }
0046 
0047 #endif /* DIRTYINDICATOR_H */
0048 
0049 // vi:expandtab:tabstop=4 shiftwidth=4: