Falkon Develop
Cross-platform Qt-based web browser
sidebar.py
Go to the documentation of this file.
1# ============================================================
2# HelloPython plugin for Falkon
3# Copyright (C) 2018 David Rosca <nowrep@gmail.com>
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17# ============================================================
18import Falkon
19from PySide6 import QtGui, QtWidgets
20from hellopython.i18n import i18n
21
22class HelloSidebar(Falkon.SideBarInterface):
23 def title(self):
24 return i18n("Hello Python Sidebar")
25
27 act = QtGui.QAction(i18n("Hello Python Sidebar"))
28 act.setCheckable(True)
29 return act
30
31 def createSideBarWidget(self, window):
32 w = QtWidgets.QWidget()
33 b = QtWidgets.QPushButton("Hello Python v0.0.1")
34 label = QtWidgets.QLabel()
35 label.setPixmap(QtGui.QPixmap(":icons/other/about.svg"))
36 l = QtWidgets.QVBoxLayout(w)
37 l.addWidget(label)
38 l.addWidget(b)
39 w.setLayout(l)
40 return w
def createSideBarWidget(self, window)
Definition: sidebar.py:31
Definition: i18n.py:1