-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowserwindow.h
114 lines (92 loc) · 2.87 KB
/
browserwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// Copyright (c) 2021-2023, K9spud LLC.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef BROWSERWINDOW_H
#define BROWSERWINDOW_H
#include "history.h"
#include <QMainWindow>
#include <QSize>
QT_BEGIN_NAMESPACE
namespace Ui { class BrowserWindow; }
QT_END_NAMESPACE
class QMenu;
class QResizeEvent;
class RescanThread;
class BrowserView;
class CompositeView;
class TabWidget;
class BrowserWindow : public QMainWindow
{
Q_OBJECT
public:
BrowserWindow(QWidget* parent = nullptr);
~BrowserWindow();
int windowId;
bool clip;
bool ask;
QSize unmaximizedSize;
CompositeView* installView;
CompositeView* uninstallView;
QStringList installList;
QStringList uninstallList;
TabWidget* tabWidget();
CompositeView* currentView();
QString lineEditText();
public slots:
void updateAskButton();
void updateClipButton();
void focusLineEdit();
void exec(QString cmd);
void exec(QString cmd, QString title);
void install(QString atom, bool isWorld);
void uninstall(QString atom);
BrowserWindow* openWindow();
void reloadDatabase();
void reloadDatabaseComplete();
void reloadAppComplete();
void viewUpdates();
void switchToTab(int index);
void enableChanged(History::WebAction action, bool enabled);
protected slots:
protected:
void closeEvent(QCloseEvent *event) override;
virtual void resizeEvent(QResizeEvent* event) override;
virtual void keyPressEvent(QKeyEvent *event) override;
virtual void dragEnterEvent(QDragEnterEvent *event) override;
virtual void dropEvent(QDropEvent *event) override;
private slots:
void on_menuButton_pressed();
void on_lineEdit_returnPressed();
void workFinished();
void back();
void forward();
void stop();
void on_newTabButton_clicked();
void on_newTabButton_longPressed();
void on_reloadButton_clicked();
void on_askButton_clicked();
void on_clipButton_clicked();
void on_backButton_longPressed();
void on_forwardButton_longPressed();
private:
Ui::BrowserWindow *ui;
QMenu* menu;
QMenu* tabsMenu;
QMenu* inactiveWindows;
void setWorking(bool workin);
bool working;
QString lastSearch;
};
#endif // BROWSERWINDOW_H