browsercore/appfw/Api/Views/BookmarksView.h
branchGCC_SURGE
changeset 8 2e16851ffecd
parent 2 bf4420e9fa4d
parent 6 1c3b8676e58c
equal deleted inserted replaced
2:bf4420e9fa4d 8:2e16851ffecd
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _BOOKMARKS_VIEW_H_
       
    20 #define _BOOKMARKS_VIEW_H_
       
    21 
       
    22 #include <QWidget>
       
    23 #include "controllableviewimpl.h"
       
    24 #include "BWFGlobal.h"
       
    25 namespace WRT {
       
    26 
       
    27     class BookmarksManager;
       
    28     class BookmarksViewPrivate;
       
    29 
       
    30     class BWF_EXPORT BookmarksView : public ControllableViewBase
       
    31     {
       
    32         Q_OBJECT
       
    33 
       
    34     public:
       
    35         BookmarksView(BookmarksManager* bm_mgr, QWidget* parent);        
       
    36         ~BookmarksView();
       
    37     
       
    38         BookmarksManager* bookmarksManager();
       
    39         
       
    40     signals:
       
    41         void openUrl(const QUrl &url);
       
    42         void close();
       
    43         
       
    44     public slots:
       
    45         virtual void activate() = 0;
       
    46         virtual void deactivate() = 0;
       
    47 
       
    48     public: // ControllableView
       
    49         virtual QString title() const;
       
    50         virtual bool isActive();
       
    51 
       
    52     protected:
       
    53         BookmarksViewPrivate * const d;
       
    54 
       
    55         //BookmarksManager *m_bookmarksManager;  //not owned
       
    56     };
       
    57     
       
    58     class BWF_EXPORT BookmarksViewJSObject : public ControllableViewJSObject {
       
    59            Q_OBJECT
       
    60          public:
       
    61            BookmarksViewJSObject(BookmarksView* view, QWebFrame* webFrame, const QString& objectName);
       
    62            ~BookmarksViewJSObject();
       
    63 
       
    64        public slots:
       
    65       
       
    66        signals:
       
    67           void done(int);
       
    68 
       
    69        protected:
       
    70           BookmarksView    * bookMarksView() { return static_cast<BookmarksView *>(m_contentView); }
       
    71           BookmarksView    * bookMarksViewConst() const { return static_cast<BookmarksView *>(m_contentView); }
       
    72           BookmarksManager * bookMarksManager() {
       
    73                      BookmarksView *  view =  static_cast<BookmarksView *>(m_contentView);
       
    74                      return view->bookmarksManager();
       
    75                  }
       
    76                  
       
    77        };
       
    78 }
       
    79 
       
    80 #endif //_BOOKMARKS_HANDLER_H_