1 /* 2 SPDX-FileCopyrightText: 2006-2007 Alexander Dymo <adymo@kdevelop.org> 3 4 SPDX-License-Identifier: LGPL-2.0-or-later 5 */ 6 7 #ifndef KDEVPLATFORM_TEST_AREAOPERATION_H 8 #define KDEVPLATFORM_TEST_AREAOPERATION_H 9 10 #include <QObject> 11 12 namespace Sublime { 13 class Area; 14 class View; 15 class Controller; 16 class MainWindow; 17 } 18 19 class TestAreaOperation: public QObject { 20 Q_OBJECT 21 private Q_SLOTS: 22 void initTestCase(); 23 void init(); 24 void cleanup(); 25 26 void areaConstruction(); 27 void mainWindowConstruction(); 28 void areaCloning(); 29 void areaSwitchingInSameMainwindow(); 30 void simpleViewAdditionAndDeletion(); 31 void complexViewAdditionAndDeletion(); 32 void toolViewAdditionAndDeletion(); 33 void testAddingViewAfter(); 34 void splitViewActiveTabsTest(); 35 36 private: 37 void checkArea1(Sublime::MainWindow *mw); 38 void checkArea2(Sublime::MainWindow *mw); 39 /*! @param location short descriptive message printed on failure. */ 40 void checkAreaViewsDisplay(Sublime::MainWindow *mw, Sublime::Area *area, 41 const QString &areas, int containers, int splitters, const QString& location=QString()); 42 43 Sublime::View *findNamedView(Sublime::Area *area, const QString &name); 44 45 Sublime::Controller *m_controller; 46 47 Sublime::Area *m_area1; 48 Sublime::Area *m_area2; 49 Sublime::Area *m_area3; 50 51 Sublime::View *m_pView111; 52 Sublime::View *m_pView121; 53 Sublime::View *m_pView122; 54 Sublime::View *m_pView131; 55 }; 56 57 #endif 58