Warning, file /office/calligra/libs/main/KoTemplatesPane.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 Copyright (C) 2005-2006 Peter Simonsson <psn@linux.se> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Library General Public 0006 License as published by the Free Software Foundation; either 0007 version 2 of the License, or (at your option) any later version. 0008 0009 This library is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 Library General Public License for more details. 0013 0014 You should have received a copy of the GNU Library General Public License 0015 along with this library; see the file COPYING.LIB. If not, write to 0016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #ifndef KOTEMPLATESPANE 0021 #define KOTEMPLATESPANE 0022 0023 #include "KoDetailsPane.h" 0024 0025 class KoTemplate; 0026 class KoTemplateGroup; 0027 0028 class KoTemplatesPanePrivate; 0029 0030 /** 0031 * This widget is the right-side part of the template opening widget. 0032 * The parent widget is initial widget in the document space of each Calligra component. 0033 * This widget shows a list of templates and can show their details or open it. 0034 */ 0035 class KoTemplatesPane : public KoDetailsPane 0036 { 0037 0038 Q_OBJECT 0039 public: 0040 /** 0041 * Constructor. 0042 * @param parent the parent widget 0043 * @param header string used as header text in the listview 0044 * @param group the group of templates this widget will show. 0045 * @param defaultTemplate pointer to the default template. Used to select a 0046 * template when none has been selected before. 0047 */ 0048 KoTemplatesPane(QWidget* parent, const QString& header, 0049 KoTemplateGroup* group, KoTemplate* defaultTemplate); 0050 ~KoTemplatesPane() override; 0051 0052 /// Returns true if a template in this group was the last one selected 0053 bool isSelected(); 0054 0055 Q_SIGNALS: 0056 /// Emitted when the always use checkbox is selected 0057 void alwaysUseChanged(KoTemplatesPane* sender, const QString& alwaysUse); 0058 0059 protected Q_SLOTS: 0060 void selectionChanged(const QModelIndex& index) override; 0061 0062 void openFile() override; 0063 void openFile(const QModelIndex& index) override; 0064 void alwaysUseClicked(); 0065 void changeAlwaysUseTemplate(KoTemplatesPane* sender, const QString& alwaysUse); 0066 0067 private: 0068 KoTemplatesPanePrivate * const d; 0069 }; 0070 0071 #endif