Warning, file /office/calligra/libs/widgets/KoRulerController.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) 2007 Thomas Zander <zander@kde.org>
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 #ifndef KORULERCONTROLLER_H
0020 #define KORULERCONTROLLER_H
0021 
0022 #include <QObject>
0023 #include "kowidgets_export.h"
0024 
0025 class KoRuler;
0026 class KoCanvasResourceManager;
0027 
0028 /**
0029  * This class combines text options with the KoRuler object.
0030  * Any usage of a horizontal ruler should consider using this class to show the
0031  * text indent and tabs on the ruler, and allow to edit them.
0032  * The code to do this is pretty trivial; just instantiate this class and you can
0033  * forget about it.  It'll do what you want.
0034  */
0035 class KOWIDGETS_EXPORT KoRulerController : public QObject
0036 {
0037     Q_OBJECT
0038 public:
0039     /**
0040      * Constructor.
0041      * @param horizontalRuler the ruler to monitor and update.
0042      *  Will also be used as QObject parent for memory management purposes.
0043      * @param crp the resource provider for the canvas this ruler and the text tool belong to.
0044      */
0045     KoRulerController(KoRuler *horizontalRuler, KoCanvasResourceManager *crp);
0046     ~KoRulerController() override;
0047 
0048 private:
0049     class Private;
0050     Private * const d;
0051 
0052     Q_PRIVATE_SLOT(d, void canvasResourceChanged(int))
0053     Q_PRIVATE_SLOT(d, void indentsChanged())
0054     Q_PRIVATE_SLOT(d, void tabChanged(int, KoRuler::Tab *tab))
0055     Q_PRIVATE_SLOT(d, void tabChangeInitiated())
0056 };
0057 
0058 #endif