-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path__init__.py
More file actions
36 lines (24 loc) · 718 Bytes
/
__init__.py
File metadata and controls
36 lines (24 loc) · 718 Bytes
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
#Import basic modules
import os
#Import the main window object (mw) from aqt
from aqt import mw
#Import the "show info" tool from utils.py
from aqt.utils import showInfo
#Import all of the Qt GUI library
from aqt.qt import *
#Import local .py modules
from . import Utils, MainWindow
echo = Utils.echo
#This is the function for starting the program
def main():
#Create the dialog
parent = mw.app.activeWindow()
dialog = MainWindow.Dialog(parent)
#Run the dialog
dialog.show()
#Create a new menu item
action = QAction("Note Comparer", mw)
#Set it to call the main function when it's clicked
action.triggered.connect(main)
#And add it to the tools menu
mw.form.menuTools.addAction(action)