File indexing completed on 2025-01-26 05:24:12
0001 /* 0002 This file is part of the Okteta Kasten module, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2009-2010 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_MODIFIEDBARCONTROLLER_HPP 0010 #define KASTEN_MODIFIEDBARCONTROLLER_HPP 0011 0012 // Kasten gui 0013 #include <Kasten/AbstractXmlGuiController> 0014 // Kasten core 0015 #include <Kasten/KastenCore> 0016 0017 namespace Kasten { 0018 class AbstractModelSynchronizer; 0019 class AbstractDocument; 0020 class StatusBar; 0021 class IconLabel; 0022 0023 class ModifiedBarController : public AbstractXmlGuiController 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 explicit ModifiedBarController(StatusBar* statusBar); 0029 0030 public: // AbstractXmlGuiController API 0031 void setTargetModel(AbstractModel* model) override; 0032 0033 private Q_SLOTS: 0034 void onContentFlagsChanged(Kasten::ContentFlags contentFlags); 0035 void onLocalSyncStateChanged(Kasten::LocalSyncState localSyncState); 0036 void onRemoteSyncStateChanged(Kasten::RemoteSyncState remoteSyncState); 0037 void onSynchronizerChanged(Kasten::AbstractModelSynchronizer* newSynchronizer); 0038 void onSynchronizerDeleted(QObject* synchronizer); 0039 0040 private: 0041 AbstractDocument* mDocument = nullptr; 0042 AbstractModelSynchronizer* mSynchronizer = nullptr; 0043 0044 IconLabel* mLocalStateLabel; 0045 IconLabel* mRemoteStateLabel; 0046 }; 0047 0048 } 0049 0050 #endif