I'm just getting my feet wet with attempting to add UI components to RV.
Using some of the examples I found on-line and the manual I'm trying to just get off the ground.
I've made what I think is a very basic plugin package which should simply print the QApplication.topLevelWidgets()
Ultimately I would like to create a list which will toggle on and off and live either docked to the side of the main window or as a separate HUD.
The package loads, however, nothing seems to ever actually do anything. I've tried several different key bindings but nothing I try seems to get picked up.
The init for the class is being called, however the key binding does not seem to get made.
_______
import types
import os
from rv import rvtypes, commands
from PySide.QtGui import QApplication
import testgui # need to get at the module itself - not sure I understand this part.
class TestGui(rvtypes.MinorMode):
def __init__(self):
rvtypes.MinorMode.__init__(self)
self.visable = 0
self.init("test-gui",
[ ("key-down-alt-p",self.toggle,"toggle TestGui") ],
None,
None)
def toggle(self, event):
print "toggle testgui"
self.visable = 1 - self.visable
if self.visable == 1:
print(QApplication.topLevelWidgets())
def createMode():
"Required to initialize the module. RV will call this function to create the mode."
return TestGui()
testgui-0.1.rvpkg