mirror of
https://github.com/nqrduck/nqrduck-spectrometer-limenqr.git
synced 2024-11-09 19:20:02 +00:00
Added submodule implementation
This commit is contained in:
parent
3439afca27
commit
3d7bf03c6b
6 changed files with 116 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
from nqrduck.module.module import Module
|
from nqrduck_spectrometer.base_spectrometer import BaseSpectrometer
|
||||||
from nqrduck_spectrometer_limenqr.model import LimeNQRModel
|
from nqrduck_spectrometer_limenqr.model import LimeNQRModel
|
||||||
from nqrduck_spectrometer_limenqr.view import LimeNQRView
|
from nqrduck_spectrometer_limenqr.view import LimeNQRView
|
||||||
from nqrduck_spectrometer_limenqr.controller import LimeNQRController
|
from nqrduck_spectrometer_limenqr.controller import LimeNQRController
|
||||||
|
|
||||||
Spectrometer = Module(LimeNQRModel, LimeNQRView, LimeNQRController)
|
LimeNQR = BaseSpectrometer(LimeNQRModel, LimeNQRView, LimeNQRController)
|
|
@ -7,6 +7,3 @@ class LimeNQRModel(ModuleModel):
|
||||||
|
|
||||||
def __init__(self, module) -> None:
|
def __init__(self, module) -> None:
|
||||||
super().__init__(module)
|
super().__init__(module)
|
||||||
|
|
||||||
def is_spectrometer(self):
|
|
||||||
return True
|
|
|
@ -1,3 +1,8 @@
|
||||||
[META]
|
[META]
|
||||||
name = limenqr
|
name = nqrduck-spectrometer-limenqr
|
||||||
toolbar_name = LimeNQR
|
toolbar_name = LimeNQR
|
||||||
|
category = Spectrometer
|
||||||
|
tooltip = Application used to control the LimeSDR
|
||||||
|
|
||||||
|
[FILES]
|
||||||
|
config = resources/limenqr.ini
|
||||||
|
|
51
src/nqrduck_spectrometer_limenqr/resources/limenqr_widget.ui
Normal file
51
src/nqrduck_spectrometer_limenqr/resources/limenqr_widget.ui
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>Form</class>
|
||||||
|
<widget class="QWidget" name="Form">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>600</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="gridLayoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>-1</x>
|
||||||
|
<y>-1</y>
|
||||||
|
<width>811</width>
|
||||||
|
<height>611</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QStackedWidget" name="stackedWidget">
|
||||||
|
<widget class="QWidget" name="page">
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>10</y>
|
||||||
|
<width>88</width>
|
||||||
|
<height>34</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>LimeNQR</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="page_2"/>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
|
@ -0,0 +1,14 @@
|
||||||
|
from PyQt5.QtWidgets import QWidget
|
||||||
|
from nqrduck.module.module_view import ModuleView
|
||||||
|
from .widget import Ui_Form
|
||||||
|
|
||||||
|
|
||||||
|
class LimeNQRView(ModuleView):
|
||||||
|
def __init__(self, module):
|
||||||
|
super().__init__(module)
|
||||||
|
|
||||||
|
widget = QWidget()
|
||||||
|
self._ui_form = Ui_Form()
|
||||||
|
self._ui_form.setupUi(self)
|
||||||
|
self.widget = widget
|
||||||
|
|
43
src/nqrduck_spectrometer_limenqr/widget.py
Normal file
43
src/nqrduck_spectrometer_limenqr/widget.py
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Form implementation generated from reading ui file '../Modules/nqrduck-spectrometer-limenqr/src/nqrduck_spectrometer_limenqr/resources/limenqr_widget.ui'
|
||||||
|
#
|
||||||
|
# Created by: PyQt5 UI code generator 5.15.9
|
||||||
|
#
|
||||||
|
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||||
|
# run again. Do not edit this file unless you know what you are doing.
|
||||||
|
|
||||||
|
|
||||||
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
|
||||||
|
class Ui_Form(object):
|
||||||
|
def setupUi(self, Form):
|
||||||
|
Form.setObjectName("Form")
|
||||||
|
Form.resize(800, 600)
|
||||||
|
self.gridLayoutWidget = QtWidgets.QWidget(Form)
|
||||||
|
self.gridLayoutWidget.setGeometry(QtCore.QRect(-1, -1, 811, 611))
|
||||||
|
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
|
||||||
|
self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget)
|
||||||
|
self.gridLayout.setContentsMargins(0, 0, 0, 0)
|
||||||
|
self.gridLayout.setObjectName("gridLayout")
|
||||||
|
self.stackedWidget = QtWidgets.QStackedWidget(self.gridLayoutWidget)
|
||||||
|
self.stackedWidget.setObjectName("stackedWidget")
|
||||||
|
self.page = QtWidgets.QWidget()
|
||||||
|
self.page.setObjectName("page")
|
||||||
|
self.pushButton = QtWidgets.QPushButton(self.page)
|
||||||
|
self.pushButton.setGeometry(QtCore.QRect(10, 10, 88, 34))
|
||||||
|
self.pushButton.setObjectName("pushButton")
|
||||||
|
self.stackedWidget.addWidget(self.page)
|
||||||
|
self.page_2 = QtWidgets.QWidget()
|
||||||
|
self.page_2.setObjectName("page_2")
|
||||||
|
self.stackedWidget.addWidget(self.page_2)
|
||||||
|
self.gridLayout.addWidget(self.stackedWidget, 0, 0, 1, 1)
|
||||||
|
|
||||||
|
self.retranslateUi(Form)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(Form)
|
||||||
|
|
||||||
|
def retranslateUi(self, Form):
|
||||||
|
_translate = QtCore.QCoreApplication.translate
|
||||||
|
Form.setWindowTitle(_translate("Form", "Form"))
|
||||||
|
self.pushButton.setText(_translate("Form", "LimeNQR"))
|
Loading…
Reference in a new issue