File indexing completed on 2024-05-05 05:48:58

0001 /*
0002     SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 // Qt includes
0010 #include <QWidget>
0011 
0012 #include "globals.h"
0013 
0014 #include "logViewColumn.h"
0015 #include "logViewColumns.h"
0016 
0017 class QDropEvent;
0018 class QDragEnterEvent;
0019 
0020 class LoadingBar;
0021 
0022 class LogViewWidget;
0023 class LogViewSearchWidget;
0024 class LogViewFilterWidget;
0025 
0026 class ViewPrivate;
0027 
0028 class View : public QWidget
0029 {
0030     Q_OBJECT
0031 
0032 public:
0033     explicit View(QWidget *parent);
0034 
0035     ~View() override;
0036 
0037     LogViewWidget *logViewWidget() const;
0038 
0039     LoadingBar *loadingBar() const;
0040 
0041     LogViewSearchWidget *logViewSearch() const;
0042 
0043     QSize sizeHint() const override;
0044 
0045 public Q_SLOTS:
0046     void displayLoadingBar(bool display);
0047 
0048     void toggleLogViewFilter(bool display);
0049     void toggleLogViewSearch(bool display);
0050 
0051 protected:
0052     /**
0053      * Method which contains the action to do when receiving a drag and drop event
0054      */
0055     void dragEnterEvent(QDragEnterEvent *event) override;
0056 
0057     /**
0058      * Method which accepts
0059      */
0060     void dropEvent(QDropEvent *event) override;
0061 
0062 private Q_SLOTS:
0063     void unselectHiddenItems();
0064 
0065 Q_SIGNALS:
0066     void searchFilterChanged();
0067 
0068     void droppedUrls(const QList<QUrl> &urls);
0069 
0070 private:
0071     /*
0072      * Log view
0073      */
0074     LogViewWidget *mLogViewWidget = nullptr;
0075 
0076     /**
0077      * Filter widget
0078      */
0079     LogViewFilterWidget *mLogViewFilterWidget = nullptr;
0080 
0081     /**
0082      * Search widget
0083      */
0084     LogViewSearchWidget *mLogViewSearchWidget = nullptr;
0085 
0086     LoadingBar *mLoadingBar = nullptr;
0087 };