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_TEST_AREAOPERATION_H 0008 #define KDEVPLATFORM_TEST_AREAOPERATION_H 0009 0010 #include <QObject> 0011 0012 namespace Sublime { 0013 class Area; 0014 class View; 0015 class Controller; 0016 class MainWindow; 0017 } 0018 0019 class TestAreaOperation: public QObject { 0020 Q_OBJECT 0021 private Q_SLOTS: 0022 void initTestCase(); 0023 void init(); 0024 void cleanup(); 0025 0026 void areaConstruction(); 0027 void mainWindowConstruction(); 0028 void areaCloning(); 0029 void areaSwitchingInSameMainwindow(); 0030 void simpleViewAdditionAndDeletion(); 0031 void complexViewAdditionAndDeletion(); 0032 void toolViewAdditionAndDeletion(); 0033 void testAddingViewAfter(); 0034 void splitViewActiveTabsTest(); 0035 0036 private: 0037 void checkArea1(Sublime::MainWindow *mw); 0038 void checkArea2(Sublime::MainWindow *mw); 0039 /*! @param location short descriptive message printed on failure. */ 0040 void checkAreaViewsDisplay(Sublime::MainWindow *mw, Sublime::Area *area, 0041 const QString &areas, int containers, int splitters, const QString& location=QString()); 0042 0043 Sublime::View *findNamedView(Sublime::Area *area, const QString &name); 0044 0045 Sublime::Controller *m_controller; 0046 0047 Sublime::Area *m_area1; 0048 Sublime::Area *m_area2; 0049 Sublime::Area *m_area3; 0050 0051 Sublime::View *m_pView111; 0052 Sublime::View *m_pView121; 0053 Sublime::View *m_pView122; 0054 Sublime::View *m_pView131; 0055 }; 0056 0057 #endif