VirtualBox

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

Last change on this file since 82781 was 76954, checked in by vboxsync, 5 years ago

FE/Qt: bugref:9072: Use UIDialogPanel as the base in log viewer panels

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/* $Id: UIVMLogViewerBookmarksPanel.h 76954 2019-01-23 12:56:07Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIVMLogViewer class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2019 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 FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerBookmarksPanel_h
19#define FEQT_INCLUDED_SRC_logviewer_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
38public:
39
40 UIVMLogViewerBookmarksPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer);
41
42 /** Adds a single bookmark to an existing list of bookmarks. Possibly called
43 * by UIVMLogViewerWidget when user adds a bookmark thru context menu etc. */
44 void addBookmark(const QPair<int, QString> &newBookmark);
45 /** Clear the bookmark list and show this list instead. Probably done after
46 * user switches to another log page tab etc. */
47 void setBookmarksList(const QVector<QPair<int, QString> > &bookmarkList);
48 void updateBookmarkList(const QVector<QPair<int, QString> > &bookmarkVector);
49 /** Disable/enable all the widget except the close button */
50 void disableEnableBookmarking(bool flag);
51 virtual QString panelName() const /* override */;
52signals:
53
54 void sigDeleteBookmark(int bookmarkIndex);
55 void sigDeleteAllBookmarks();
56 void sigBookmarkSelected(int index);
57
58protected:
59
60 virtual void prepareWidgets() /* override */;
61 virtual void prepareConnections() /* override */;
62
63 /** Handles the translation event. */
64 void retranslateUi();
65
66private slots:
67
68 void sltDeleteCurrentBookmark();
69 void sltBookmarkSelected(int index);
70 void sltGotoNextBookmark();
71 void sltGotoPreviousBookmark();
72 void sltGotoSelectedBookmark();
73
74private:
75
76 /** @a index is the index of the curent bookmark. */
77 void setBookmarkIndex(int index);
78
79 const int m_iMaxBookmarkTextLength;
80 QComboBox *m_pBookmarksComboBox;
81 QIToolButton *m_pGotoSelectedBookmark;
82 QIToolButton *m_pDeleteAllButton;
83 QIToolButton *m_pDeleteCurrentButton;
84 QIToolButton *m_pNextButton;
85 QIToolButton *m_pPreviousButton;
86};
87
88#endif /* !FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerBookmarksPanel_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use