Warning, file /office/calligra/libs/rdf/KoSemanticStylesheetsEditor.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) 2010 KO GmbH <ben.martin@kogmbh.com>
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 __rdf_KoSemanticStylesheetsEditor_h__
0021 #define __rdf_KoSemanticStylesheetsEditor_h__
0022 
0023 #include "kordf_export.h"
0024 #include "RdfForward.h"
0025 // Calligra
0026 #include <KoDialog.h>
0027 // Qt
0028 #include <QSharedPointer>
0029 
0030 class QTreeWidgetItem;
0031 class QTableWidgetItem;
0032 
0033 /**
0034  * @short A dialog to allow the user to see the system stylesheet definitions
0035  *        and create and edit user stylesheets.
0036  *
0037  * @author Ben Martin <ben.martin@kogmbh.com>
0038  * @see KoDocument
0039  */
0040 class KORDF_EXPORT KoSemanticStylesheetsEditor : public KoDialog
0041 {
0042     Q_OBJECT
0043 public:
0044     KoSemanticStylesheetsEditor(QWidget *parent, KoDocumentRdf *rdf);
0045     ~KoSemanticStylesheetsEditor();
0046 
0047 protected Q_SLOTS:
0048     void slotOk();
0049     void currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
0050     void newStylesheet();
0051     void deleteStylesheet();
0052     void onVariableActivated(QTableWidgetItem *item);
0053     void definitionChanged();
0054 
0055 private:
0056 
0057     void setupStylesheetsItems(const QString &semanticClass,
0058                                hKoRdfSemanticItem si,
0059                                const QList<hKoSemanticStylesheet> &ssl,
0060                                const QMap<QString, QTreeWidgetItem*> &m,
0061                                bool editable = false);
0062     void maskButtonsDependingOnCurrentItem(QTreeWidgetItem *current);
0063 
0064     class Private;
0065     QSharedPointer<Private> d;
0066 };
0067 
0068 #endif