File indexing completed on 2024-04-28 05:49:32
0001 /* This file is part of the KDE project 0002 SPDX-FileCopyrightText: 2004 Joseph Wenninger <jowenn@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <ktexteditor/document.h> 0010 0011 #include <QDialog> 0012 0013 class QLabel; 0014 class QTreeWidget; 0015 class QTreeWidgetItem; 0016 class QPushButton; 0017 0018 class KateSaveModifiedDialog : public QDialog 0019 { 0020 Q_OBJECT 0021 public: 0022 KateSaveModifiedDialog(QWidget *parent, const std::vector<KTextEditor::Document *> &documents); 0023 ~KateSaveModifiedDialog() override; 0024 static bool queryClose(QWidget *parent, const std::vector<KTextEditor::Document *> &documents); 0025 0026 protected: 0027 void showEvent(QShowEvent *event) override; 0028 bool doSave(); 0029 protected Q_SLOTS: 0030 void slotSelectAll(); 0031 void slotItemActivated(QTreeWidgetItem *, int); 0032 void slotSaveSelected(); 0033 void slotDoNotSave(); 0034 0035 private: 0036 QLabel *m_label; 0037 QTreeWidget *m_list; 0038 QPushButton *m_saveButton; 0039 };