VirtualBox

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

Last change on this file since 100915 was 100915, checked in by vboxsync, 16 months ago

FE/Qt: bugref:10496, bugref:9072. Moving log viewer's search panel. First part.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: UIVMLogViewerBookmarksPanel.h 100915 2023-08-21 05:17:31Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIVMLogViewer class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerBookmarksPanel_h
29#define FEQT_INCLUDED_SRC_logviewer_UIVMLogViewerBookmarksPanel_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* GUI includes: */
35#include "UIVMLogBookmark.h"
36#include "UIVMLogViewerPanel.h"
37
38/* Forward declarations: */
39class QComboBox;
40class QWidget;
41class QIToolButton;
42
43/** UIVMLogViewerPanel extension providing GUI for bookmark management. Show a list of bookmarks currently set
44 * for displayed log page. It has controls to navigate and clear bookmarks. */
45class UIVMLogViewerBookmarksPanel : public UIVMLogViewerPanel
46{
47 Q_OBJECT;
48
49public:
50
51 UIVMLogViewerBookmarksPanel(QWidget *pParent, UIVMLogViewerWidget *pViewer);
52
53 /** Adds a single bookmark to an existing list of bookmarks. Possibly called
54 * by UIVMLogViewerWidget when user adds a bookmark thru context menu etc. */
55 void addBookmark(const QPair<int, QString> &newBookmark);
56 /** Clear the bookmark list and show this list instead. Probably done after
57 * user switches to another log page tab etc. */
58 void setBookmarksList(const QVector<QPair<int, QString> > &bookmarkList);
59 void updateBookmarkList(const QVector<UIVMLogBookmark>& bookmarkList);
60 /** Disable/enable all the widget except the close button */
61 void disableEnableBookmarking(bool flag);
62
63signals:
64
65 void sigDeleteBookmarkByIndex(int bookmarkIndex);
66 void sigDeleteAllBookmarks();
67 void sigBookmarkSelected(int index);
68
69protected:
70
71 virtual void prepareWidgets() RT_OVERRIDE;
72 virtual void prepareConnections() RT_OVERRIDE;
73
74 /** Handles the translation event. */
75 void retranslateUi();
76
77private slots:
78
79 void sltDeleteCurrentBookmark();
80 void sltBookmarkSelected(int index);
81 void sltGotoNextBookmark();
82 void sltGotoPreviousBookmark();
83 void sltGotoSelectedBookmark();
84
85private:
86
87 /** @a index is the index of the curent bookmark. */
88 void setBookmarkIndex(int index);
89
90 const int m_iMaxBookmarkTextLength;
91 QComboBox *m_pBookmarksComboBox;
92 QIToolButton *m_pGotoSelectedBookmark;
93 QIToolButton *m_pDeleteAllButton;
94 QIToolButton *m_pDeleteCurrentButton;
95 QIToolButton *m_pNextButton;
96 QIToolButton *m_pPreviousButton;
97};
98
99#endif /* !FEQT_INCLUDED_SRC_logviewer_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