File indexing completed on 2024-05-05 05:52:18
0001 /* This file is part of the Kate project. 0002 * Based on the snippet plugin from KDevelop 4. 0003 * 0004 * SPDX-FileCopyrightText: 2007 Robert Gruber <rgruber@users.sourceforge.net> 0005 * SPDX-FileCopyrightText: 2010 Milian Wolff <mail@milianw.de> 0006 * SPDX-FileCopyrightText: 2012 Christoph Cullmann <cullmann@kde.org> 0007 * 0008 * SPDX-License-Identifier: LGPL-2.0-or-later 0009 */ 0010 0011 #pragma once 0012 0013 #include "ui_editrepository.h" 0014 0015 #include <QDialog> 0016 0017 class SnippetRepository; 0018 0019 /** 0020 * This dialog is used to create/edit snippet repositories and 0021 * the snippets in them. 0022 * 0023 * @author Milian Wolff <mail@milianw.de> 0024 */ 0025 class EditRepository : public QDialog, public Ui::EditRepositoryBase 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 /// @p repo set to 0 when you want to create a new repository. 0031 explicit EditRepository(SnippetRepository *repo, QWidget *parent = nullptr); 0032 0033 private: 0034 SnippetRepository *m_repo; 0035 0036 private Q_SLOTS: 0037 void save(); 0038 void validate(); 0039 void updateFileTypes(); 0040 };