File indexing completed on 2024-05-19 04:39:50

0001 /*
0002     SPDX-FileCopyrightText: 2006-2007 Alexander Dymo <adymo@kdevelop.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KDEVPLATFORM_AREAPRINTER_H
0008 #define KDEVPLATFORM_AREAPRINTER_H
0009 
0010 
0011 #include <sublime/area.h>
0012 #include <sublime/sublimedefs.h>
0013 
0014 namespace Sublime {
0015     class AreaIndex;
0016     class View;
0017 }
0018 
0019 //those two classes will pretty-print area views and tool views
0020 //make sure you provided object names for your views (with setObjectName())
0021 
0022 class AreaViewsPrinter {
0023 public:
0024     AreaViewsPrinter();
0025     Sublime::Area::WalkerMode operator()(Sublime::AreaIndex *index);
0026     QString result;
0027 
0028 private:
0029     QString printIndentation(Sublime::AreaIndex *index) const;
0030     QString printOrientation(Qt::Orientation o) const;
0031 };
0032 
0033 class AreaToolViewsPrinter {
0034 public:
0035     AreaToolViewsPrinter();
0036     Sublime::Area::WalkerMode operator()(Sublime::View *view, Sublime::Position position);
0037     QString result;
0038 
0039 private:
0040     QString printPosition(Sublime::Position position);
0041 };
0042 
0043 #endif
0044