mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 03:16:10 +00:00
Use only cutter module in sample plugin
This commit is contained in:
parent
7315f8e102
commit
d4a6b031ff
@ -1,12 +1,11 @@
|
||||
|
||||
import cutter
|
||||
import CutterBindings
|
||||
|
||||
from PySide2.QtCore import QObject, SIGNAL, Qt
|
||||
from PySide2.QtWidgets import QAction, QVBoxLayout, QLabel, QWidget, QSizePolicy, QPushButton
|
||||
|
||||
|
||||
class FortuneWidget(CutterBindings.CutterDockWidget):
|
||||
class FortuneWidget(cutter.CutterDockWidget):
|
||||
def __init__(self, main, action):
|
||||
super(FortuneWidget, self).__init__(main, action)
|
||||
self.setObjectName("FancyDockWidgetFromCoolPlugin")
|
||||
@ -20,7 +19,7 @@ class FortuneWidget(CutterBindings.CutterDockWidget):
|
||||
content.setLayout(layout)
|
||||
self.text = QLabel(content)
|
||||
self.text.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
|
||||
self.text.setFont(CutterBindings.Configuration.instance().getFont())
|
||||
self.text.setFont(cutter.Configuration.instance().getFont())
|
||||
layout.addWidget(self.text)
|
||||
|
||||
button = QPushButton(content)
|
||||
@ -42,7 +41,7 @@ class FortuneWidget(CutterBindings.CutterDockWidget):
|
||||
self.text.setText(res)
|
||||
|
||||
|
||||
class CutterSamplePlugin(CutterBindings.CutterPlugin):
|
||||
class CutterSamplePlugin(cutter.CutterPlugin):
|
||||
name = "SamplePlugin"
|
||||
description = "A sample plugin written in python."
|
||||
version = "1.0"
|
||||
|
Loading…
Reference in New Issue
Block a user