File indexing completed on 2024-04-28 15:29:24
0001 /* 0002 This file is part of the KDE project 0003 SPDX-FileCopyrightText: 1999 Simon Hausmann <hausmann@kde.org> 0004 SPDX-FileCopyrightText: 1999 David Faure <faure@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef __kparts_windowargs_h__ 0010 #define __kparts_windowargs_h__ 0011 0012 #include <kparts/kparts_export.h> 0013 0014 #include <QSharedDataPointer> 0015 0016 class QRect; 0017 0018 namespace KParts 0019 { 0020 class WindowArgsPrivate; 0021 0022 /** 0023 * @class WindowArgs windowargs.h <KParts/WindowArgs> 0024 * 0025 * @short The WindowArgs are used to specify arguments to the "create new window" 0026 * call (see the createNewWindow variant that uses WindowArgs). 0027 * The primary reason for this is the javascript window.open function. 0028 */ 0029 class KPARTS_EXPORT WindowArgs 0030 { 0031 public: 0032 WindowArgs(); 0033 ~WindowArgs(); 0034 WindowArgs(const WindowArgs &args); 0035 WindowArgs &operator=(const WindowArgs &args); 0036 WindowArgs(const QRect &_geometry, bool _fullscreen, bool _menuBarVisible, bool _toolBarsVisible, bool _statusBarVisible, bool _resizable); 0037 WindowArgs(int _x, int _y, int _width, int _height, bool _fullscreen, bool _menuBarVisible, bool _toolBarsVisible, bool _statusBarVisible, bool _resizable); 0038 0039 void setX(int x); 0040 int x() const; 0041 0042 void setY(int y); 0043 int y() const; 0044 0045 void setWidth(int w); 0046 int width() const; 0047 0048 void setHeight(int h); 0049 int height() const; 0050 0051 void setFullScreen(bool fs); 0052 bool isFullScreen() const; 0053 0054 void setMenuBarVisible(bool visible); 0055 bool isMenuBarVisible() const; 0056 0057 void setToolBarsVisible(bool visible); 0058 bool toolBarsVisible() const; 0059 0060 void setStatusBarVisible(bool visible); 0061 bool isStatusBarVisible() const; 0062 0063 void setResizable(bool resizable); 0064 bool isResizable() const; 0065 0066 void setLowerWindow(bool lower); 0067 bool lowerWindow() const; 0068 0069 void setScrollBarsVisible(bool visible); 0070 bool scrollBarsVisible() const; 0071 0072 private: 0073 QSharedDataPointer<WindowArgsPrivate> d; 0074 }; 0075 0076 } 0077 0078 #endif