diff --git a/includes/CMakeLists.txt b/includes/CMakeLists.txt index 273fe2dd..7bf754f7 100644 --- a/includes/CMakeLists.txt +++ b/includes/CMakeLists.txt @@ -473,7 +473,6 @@ install( install( FILES KParts/BrowserExtension - KParts/BrowserHostExtension KParts/Event KParts/Factory KParts/FileInfoExtension @@ -491,7 +490,6 @@ install( KParts/ReadOnlyPart KParts/ReadWritePart KParts/StatusBarExtension - KParts/WindowArgs DESTINATION ${KDE4_INCLUDE_INSTALL_DIR}/KDE/KParts COMPONENT Devel ) diff --git a/includes/KParts/BrowserHostExtension b/includes/KParts/BrowserHostExtension deleted file mode 100644 index 5f0072f0..00000000 --- a/includes/KParts/BrowserHostExtension +++ /dev/null @@ -1 +0,0 @@ -#include "../../kparts/browserextension.h" diff --git a/includes/KParts/WindowArgs b/includes/KParts/WindowArgs deleted file mode 100644 index 5f0072f0..00000000 --- a/includes/KParts/WindowArgs +++ /dev/null @@ -1 +0,0 @@ -#include "../../kparts/browserextension.h" diff --git a/kparts/browserextension.cpp b/kparts/browserextension.cpp index c103d068..39fd7a0f 100644 --- a/kparts/browserextension.cpp +++ b/kparts/browserextension.cpp @@ -235,207 +235,6 @@ bool BrowserArguments::forcesNewWindow() const namespace KParts { -class WindowArgsPrivate : public QSharedData -{ -public: - WindowArgsPrivate() - : x(-1), y(-1), width(-1), height(-1), - fullscreen(false), - menuBarVisible(true), - toolBarsVisible(true), - statusBarVisible(true), - resizable(true), - lowerWindow(false), - scrollBarsVisible(true) - { - } - - // Position - int x; - int y; - // Size - int width; - int height; - bool fullscreen; //defaults to false - bool menuBarVisible; //defaults to true - bool toolBarsVisible; //defaults to true - bool statusBarVisible; //defaults to true - bool resizable; //defaults to true - - bool lowerWindow; //defaults to false - bool scrollBarsVisible; //defaults to true -}; - -} - -WindowArgs::WindowArgs() - : d(new WindowArgsPrivate) -{ -} - -WindowArgs::WindowArgs( const WindowArgs &args ) - : d(args.d) -{ -} - -WindowArgs::~WindowArgs() -{ -} - -WindowArgs &WindowArgs::operator=( const WindowArgs &args ) -{ - if ( this == &args ) return *this; - - d = args.d; - return *this; -} - -WindowArgs::WindowArgs( const QRect &_geometry, bool _fullscreen, bool _menuBarVisible, - bool _toolBarsVisible, bool _statusBarVisible, bool _resizable ) - : d(new WindowArgsPrivate) -{ - d->x = _geometry.x(); - d->y = _geometry.y(); - d->width = _geometry.width(); - d->height = _geometry.height(); - d->fullscreen = _fullscreen; - d->menuBarVisible = _menuBarVisible; - d->toolBarsVisible = _toolBarsVisible; - d->statusBarVisible = _statusBarVisible; - d->resizable = _resizable; - d->lowerWindow = false; -} - -WindowArgs::WindowArgs( int _x, int _y, int _width, int _height, bool _fullscreen, - bool _menuBarVisible, bool _toolBarsVisible, - bool _statusBarVisible, bool _resizable ) - : d(new WindowArgsPrivate) -{ - d->x = _x; - d->y = _y; - d->width = _width; - d->height = _height; - d->fullscreen = _fullscreen; - d->menuBarVisible = _menuBarVisible; - d->toolBarsVisible = _toolBarsVisible; - d->statusBarVisible = _statusBarVisible; - d->resizable = _resizable; - d->lowerWindow = false; -} - -void WindowArgs::setX(int x) -{ - d->x = x; -} - -int WindowArgs::x() const -{ - return d->x; -} - -void WindowArgs::setY(int y) -{ - d->y = y; -} - -int WindowArgs::y() const -{ - return d->y; -} - -void WindowArgs::setWidth(int w) -{ - d->width = w; -} - -int WindowArgs::width() const -{ - return d->width; -} - -void WindowArgs::setHeight(int h) -{ - d->height = h; -} - -int WindowArgs::height() const -{ - return d->height; -} - -void WindowArgs::setFullScreen(bool fs) -{ - d->fullscreen = fs; -} - -bool WindowArgs::isFullScreen() const -{ - return d->fullscreen; -} - -void WindowArgs::setMenuBarVisible(bool visible) -{ - d->menuBarVisible = visible; -} - -bool WindowArgs::isMenuBarVisible() const -{ - return d->menuBarVisible; -} - -void WindowArgs::setToolBarsVisible(bool visible) -{ - d->toolBarsVisible = visible; -} - -bool WindowArgs::toolBarsVisible() const -{ - return d->toolBarsVisible; -} - -void WindowArgs::setStatusBarVisible(bool visible) -{ - d->statusBarVisible = visible; -} - -bool WindowArgs::isStatusBarVisible() const -{ - return d->statusBarVisible; -} - -void WindowArgs::setResizable(bool resizable) -{ - d->resizable = resizable; -} - -bool WindowArgs::isResizable() const -{ - return d->resizable; -} - -void WindowArgs::setLowerWindow(bool lower) -{ - d->lowerWindow = lower; -} - -bool WindowArgs::lowerWindow() const -{ - return d->lowerWindow; -} - -void WindowArgs::setScrollBarsVisible(bool visible) -{ - d->scrollBarsVisible = visible; -} - -bool WindowArgs::scrollBarsVisible() const -{ - return d->scrollBarsVisible; -} - -namespace KParts -{ - // Internal class, use to store the status of the actions class KBitArray { @@ -724,65 +523,6 @@ BrowserExtension *BrowserExtension::childObject( QObject *obj ) return KGlobal::findDirectChild(obj); } -namespace KParts -{ - -class BrowserHostExtension::BrowserHostExtensionPrivate -{ -public: - BrowserHostExtensionPrivate() - { - } - ~BrowserHostExtensionPrivate() - { - } - - KParts::ReadOnlyPart *m_part; -}; - -} - -BrowserHostExtension::BrowserHostExtension( KParts::ReadOnlyPart *parent ) - : QObject( parent ), d( new BrowserHostExtensionPrivate ) -{ - d->m_part = parent; -} - -BrowserHostExtension::~BrowserHostExtension() -{ - delete d; -} - -QStringList BrowserHostExtension::frameNames() const -{ - return QStringList(); -} - -const QList BrowserHostExtension::frames() const -{ - return QList(); -} - -bool BrowserHostExtension::openUrlInFrame( const KUrl &, - const KParts::OpenUrlArguments&, - const KParts::BrowserArguments & ) -{ - return false; -} - -BrowserHostExtension *BrowserHostExtension::childObject( QObject *obj ) -{ - return KGlobal::findDirectChild(obj); -} - -BrowserHostExtension * -BrowserHostExtension::findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &frame) -{ - Q_UNUSED(callingPart); - Q_UNUSED(frame); - return 0; -} - LiveConnectExtension::LiveConnectExtension( KParts::ReadOnlyPart *parent ) : QObject( parent ), d( 0 ) {} diff --git a/kparts/browserextension.h b/kparts/browserextension.h index 62ac4190..d67f814f 100644 --- a/kparts/browserextension.h +++ b/kparts/browserextension.h @@ -180,63 +180,6 @@ private: BrowserArgumentsPrivate *d; }; -class WindowArgsPrivate; - -/** - * The WindowArgs are used to specify arguments to the "create new window" - * call (see the createNewWindow variant that uses WindowArgs). - * The primary reason for this is the javascript window.open function. - */ -class KPARTS_EXPORT WindowArgs -{ -public: - WindowArgs(); - ~WindowArgs(); - WindowArgs( const WindowArgs &args ); - WindowArgs &operator=( const WindowArgs &args ); - WindowArgs( const QRect &_geometry, bool _fullscreen, bool _menuBarVisible, - bool _toolBarsVisible, bool _statusBarVisible, bool _resizable ); - WindowArgs( int _x, int _y, int _width, int _height, bool _fullscreen, - bool _menuBarVisible, bool _toolBarsVisible, - bool _statusBarVisible, bool _resizable ); - - void setX(int x); - int x() const; - - void setY(int y); - int y() const; - - void setWidth(int w); - int width() const; - - void setHeight(int h); - int height() const; - - void setFullScreen(bool fs); - bool isFullScreen() const; - - void setMenuBarVisible(bool visible); - bool isMenuBarVisible() const; - - void setToolBarsVisible(bool visible); - bool toolBarsVisible() const; - - void setStatusBarVisible(bool visible); - bool isStatusBarVisible() const; - - void setResizable(bool resizable); - bool isResizable() const; - - void setLowerWindow(bool lower); - bool lowerWindow() const; - - void setScrollBarsVisible(bool visible); - bool scrollBarsVisible() const; - -private: - QSharedDataPointer d; -}; - /** * The KParts::OpenUrlEvent event informs that a given part has opened a given URL. * Applications can use this event to send this information to interested plugins. @@ -570,8 +513,7 @@ public: // yes, those signals are public; don't tell moc, doxygen or kdevelop : void createNewWindow( const KUrl &url, const KParts::OpenUrlArguments& arguments = KParts::OpenUrlArguments(), const KParts::BrowserArguments &browserArguments = KParts::BrowserArguments(), - const KParts::WindowArgs &windowArgs = KParts::WindowArgs(), - KParts::ReadOnlyPart** part = 0 ); // TODO consider moving to BrowserHostExtension? + KParts::ReadOnlyPart** part = 0 ); /** * Since the part emits the jobid in the started() signal, @@ -699,58 +641,6 @@ private: BrowserExtensionPrivate * const d; }; -/** - * An extension class for container parts, i.e. parts that contain - * other parts. - * For instance a KWebKitPart hosts one part per frame. - */ -class KPARTS_EXPORT BrowserHostExtension : public QObject -{ - Q_OBJECT -public: - BrowserHostExtension( KParts::ReadOnlyPart *parent ); - - virtual ~BrowserHostExtension(); - - /** - * Returns a list of the names of all hosted child objects. - * - * Note that this method does not query the child objects recursively. - */ - virtual QStringList frameNames() const; - - /** - * Returns a list of pointers to all hosted child objects. - * - * Note that this method does not query the child objects recursively. - */ - virtual const QList frames() const; - - /** - * Returns the part that contains @p frame and that may be accessed - * by @p callingPart - */ - virtual BrowserHostExtension *findFrameParent(KParts::ReadOnlyPart *callingPart, const QString &frame); - - /** - * Opens the given url in a hosted child frame. The frame name is specified in the - * frameName variable in the @p browserArguments parameter (see KParts::BrowserArguments ) . - */ - virtual bool openUrlInFrame( const KUrl &url, - const KParts::OpenUrlArguments& arguments, - const KParts::BrowserArguments &browserArguments ); - - /** - * Queries @p obj for a child object which inherits from this - * BrowserHostExtension class. Convenience method. - */ - static BrowserHostExtension *childObject( QObject *obj ); - -private: - class BrowserHostExtensionPrivate; - BrowserHostExtensionPrivate * const d; -}; - /** * An extension class for LiveConnect, i.e. a call from JavaScript * from a HTML page which embeds this part.