File indexing completed on 2024-04-28 04:58:12

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 WINDOWARGS_H
0010 #define WINDOWARGS_H
0011 
0012 #include <libkonq_export.h>
0013 
0014 #include <QSharedDataPointer>
0015 
0016 class QRect;
0017 
0018 class WindowArgsPrivate;
0019 
0020 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
0021 /**
0022  * @class WindowArgs windowargs.h
0023  *
0024  * @short The WindowArgs are used to specify arguments to the "create new window"
0025  * call (see the createNewWindow variant that uses WindowArgs).
0026  * The primary reason for this is the javascript window.open function.
0027  */
0028 class LIBKONQ_EXPORT WindowArgs
0029 {
0030 public:
0031     WindowArgs();
0032     ~WindowArgs();
0033     WindowArgs(const WindowArgs &args);
0034     WindowArgs &operator=(const WindowArgs &args);
0035     WindowArgs(const QRect &_geometry, bool _fullscreen, bool _menuBarVisible, bool _toolBarsVisible, bool _statusBarVisible, bool _resizable);
0036     WindowArgs(int _x, int _y, int _width, int _height, bool _fullscreen, bool _menuBarVisible, bool _toolBarsVisible, bool _statusBarVisible, bool _resizable);
0037 
0038     void setX(int x);
0039     int x() const;
0040 
0041     void setY(int y);
0042     int y() const;
0043 
0044     void setWidth(int w);
0045     int width() const;
0046 
0047     void setHeight(int h);
0048     int height() const;
0049 
0050     void setFullScreen(bool fs);
0051     bool isFullScreen() const;
0052 
0053     void setMenuBarVisible(bool visible);
0054     bool isMenuBarVisible() const;
0055 
0056     void setToolBarsVisible(bool visible);
0057     bool toolBarsVisible() const;
0058 
0059     void setStatusBarVisible(bool visible);
0060     bool isStatusBarVisible() const;
0061 
0062     void setResizable(bool resizable);
0063     bool isResizable() const;
0064 
0065     void setLowerWindow(bool lower);
0066     bool lowerWindow() const;
0067 
0068     void setScrollBarsVisible(bool visible);
0069     bool scrollBarsVisible() const;
0070 
0071 private:
0072     QSharedDataPointer<WindowArgsPrivate> d;
0073 };
0074 #else
0075 #include <KParts/WindowArgs>
0076 using WindowArgs = KParts::WindowArgs;
0077 #endif
0078 
0079 
0080 #endif