1 | /* $Id: UIVMLogViewerBookmarksPanel.h 70500 2018-01-10 09:36:36Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIVMLogViewer class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-2017 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ___UIVMLogViewerBookmarksPanel_h___
|
---|
19 | #define ___UIVMLogViewerBookmarksPanel_h___
|
---|
20 |
|
---|
21 | /* GUI includes: */
|
---|
22 | #include "UIVMLogViewerPanel.h"
|
---|
23 |
|
---|
24 | /* Forward declarations: */
|
---|
25 | class QComboBox;
|
---|
26 | class QPushButton;
|
---|
27 |
|
---|
28 |
|
---|
29 |
|
---|
30 |
|
---|
31 | /** UIVMLogViewerPanel extension providing GUI for bookmark management. Show a list of bookmarks currently set
|
---|
32 | for displayed log page. It has controls to navigate and clear bookmarks. */
|
---|
33 | class UIVMLogViewerBookmarksPanel : public UIVMLogViewerPanel
|
---|
34 | {
|
---|
35 | Q_OBJECT;
|
---|
36 |
|
---|
37 | signals:
|
---|
38 |
|
---|
39 | public:
|
---|
40 |
|
---|
41 | UIVMLogViewerBookmarksPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer);
|
---|
42 |
|
---|
43 | /* Adds a single bookmark to an existing list of bookmarks. Possibly called
|
---|
44 | by UIVMLogViewerWidget when user adds a bookmark thru context menu etc. */
|
---|
45 | void addBookmark(const QPair<int, QString> &newBookmark);
|
---|
46 | /* Clear the bookmark list and show this list instead. Probably done after
|
---|
47 | user switches to another log page tab etc. */
|
---|
48 | void setBookmarksList(const QVector<QPair<int, QString> > &bookmarkList);
|
---|
49 | void updateBookmarkList();
|
---|
50 | /* @a index is the index of the curent bookmark. */
|
---|
51 | void setBookmarkIndex(int index);
|
---|
52 |
|
---|
53 | public slots:
|
---|
54 |
|
---|
55 | protected:
|
---|
56 |
|
---|
57 | virtual void prepareWidgets() /* override */;
|
---|
58 | virtual void prepareConnections() /* override */;
|
---|
59 |
|
---|
60 | /** Handles the translation event. */
|
---|
61 | void retranslateUi();
|
---|
62 |
|
---|
63 | private slots:
|
---|
64 |
|
---|
65 | private:
|
---|
66 |
|
---|
67 | const int m_iMaxBookmarkTextLength;
|
---|
68 | QComboBox *m_pBookmarksComboBox;
|
---|
69 | QPushButton *m_clearAllButton;
|
---|
70 | QPushButton *m_clearCurrentButton;
|
---|
71 | };
|
---|
72 |
|
---|
73 | #endif /* !___UIVMLogViewerBookmarksPanel_h___ */
|
---|