browsercore/appfw/Api/Views/BookMarksHistoryView.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_HISTORY_VIEW_H_
       
    20 #define _BOOKMARKS_HISTORY_VIEW_H_
       
    21 
       
    22 #include <QtGui/QTreeView>
       
    23 #include <QtGui/QWidget>
       
    24 
       
    25 #include "BookmarksView.h"
       
    26 
       
    27 
       
    28 namespace WRT {
       
    29 
       
    30     class BookmarksHistoryViewPrivate;
       
    31     class BookmarkNode;
       
    32     class BookmarksManager;
       
    33         
       
    34 class BWF_EXPORT  BookmarksHistoryView : public BookmarksView
       
    35     {
       
    36         Q_OBJECT
       
    37     public: 
       
    38         BookmarksHistoryView(BookmarksManager* bm_mgr, QWidget* parent);            
       
    39         ~BookmarksHistoryView();
       
    40         QString title();
       
    41         static ControllableView *createNew(QWidget *parent);
       
    42    
       
    43     signals:
       
    44             void activated();
       
    45             void deactivated();
       
    46             
       
    47     public slots:
       
    48         void openItem(const QModelIndex &index);
       
    49         void itemExpanded(const QModelIndex &index);
       
    50         void itemCollapsed(const QModelIndex &index);
       
    51 
       
    52     public slots: //BookmarksView
       
    53         void activate();
       
    54         void deactivate();
       
    55 
       
    56     public: //BookmarksView
       
    57         QList<QAction*> getContext();
       
    58         static const QString Type() { return "bookmarkHistoryView"; }
       
    59         virtual QString type() const { return Type(); }
       
    60 
       
    61     protected:
       
    62         QWidget* qWidget() const;
       
    63         virtual QGraphicsWidget* widget() const;
       
    64     private:
       
    65         BookmarksHistoryViewPrivate * const dBookmarksHistoryViewPrivate;
       
    66         
       
    67     };
       
    68 
       
    69 
       
    70 
       
    71 class BWF_EXPORT BookmarksHistoryViewJSObject : public ControllableViewJSObject {
       
    72            Q_OBJECT
       
    73  public: 
       
    74         BookmarksHistoryViewJSObject(BookmarksHistoryView* view, QWebFrame* webFrame, const QString& objectName);
       
    75        ~BookmarksHistoryViewJSObject();
       
    76 
       
    77       
       
    78        public slots:
       
    79        
       
    80        signals:
       
    81           void done(int);
       
    82           void activated();
       
    83           void deactivated();
       
    84           void openUrl();
       
    85 
       
    86        protected:
       
    87        BookmarksHistoryView * bookMarksHistoryView() { return static_cast<BookmarksHistoryView *>(m_contentView); }
       
    88        BookmarksHistoryView * bookMarksHistoryViewConst() const { return static_cast<BookmarksHistoryView *>(m_contentView); }
       
    89                     
       
    90        };
       
    91 }
       
    92 #endif //_BOOKMARKS_HISTORY_VIEW_H_