VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerBookmarksPanel.h@ 76532

Last change on this file since 76532 was 76532, checked in by vboxsync, 6 years ago

Frontends: scm --fix-header-guards. bugref:9344

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/* $Id: UIVMLogViewerBookmarksPanel.h 76532 2018-12-30 06:08:06Z 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#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* GUI includes: */
25#include "UIVMLogViewerPanel.h"
26
27/* Forward declarations: */
28class QComboBox;
29class QWidget;
30class QIToolButton;
31
32/** UIVMLogViewerPanel extension providing GUI for bookmark management. Show a list of bookmarks currently set
33 * for displayed log page. It has controls to navigate and clear bookmarks. */
34class UIVMLogViewerBookmarksPanel : public UIVMLogViewerPanel
35{
36 Q_OBJECT;
37
38signals:
39
40 void sigDeleteBookmark(int bookmarkIndex);
41 void sigDeleteAllBookmarks();
42 void sigBookmarkSelected(int index);
43
44public:
45
46 UIVMLogViewerBookmarksPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer);
47
48 /** Adds a single bookmark to an existing list of bookmarks. Possibly called
49 * by UIVMLogViewerWidget when user adds a bookmark thru context menu etc. */
50 void addBookmark(const QPair<int, QString> &newBookmark);
51 /** Clear the bookmark list and show this list instead. Probably done after
52 * user switches to another log page tab etc. */
53 void setBookmarksList(const QVector<QPair<int, QString> > &bookmarkList);
54 void updateBookmarkList(const QVector<QPair<int, QString> > &bookmarkVector);
55 /** Disable/enable all the widget except the close button */
56 void disableEnableBookmarking(bool flag);
57
58public slots:
59
60protected:
61
62 virtual void prepareWidgets() /* override */;
63 virtual void prepareConnections() /* override */;
64
65 /** Handles the translation event. */
66 void retranslateUi();
67
68private slots:
69
70 void sltDeleteCurrentBookmark();
71 void sltBookmarkSelected(int index);
72 void sltGotoNextBookmark();
73 void sltGotoPreviousBookmark();
74 void sltGotoSelectedBookmark();
75
76private:
77
78 /** @a index is the index of the curent bookmark. */
79 void setBookmarkIndex(int index);
80
81 const int m_iMaxBookmarkTextLength;
82 QComboBox *m_pBookmarksComboBox;
83 QIToolButton *m_pGotoSelectedBookmark;
84 QIToolButton *m_pDeleteAllButton;
85 QIToolButton *m_pDeleteCurrentButton;
86 QIToolButton *m_pNextButton;
87 QIToolButton *m_pPreviousButton;
88};
89
90#endif /* !___UIVMLogViewerBookmarksPanel_h___ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette