mirror of https://github.com/m-labs/artiq.git
gui: add ARTIQ icon
This commit is contained in:
parent
a3f0663823
commit
95ff21d829
|
@ -8,6 +8,7 @@ import atexit
|
||||||
# it has chosen.
|
# it has chosen.
|
||||||
from quamash import QEventLoop, QtGui
|
from quamash import QEventLoop, QtGui
|
||||||
from pyqtgraph import dockarea
|
from pyqtgraph import dockarea
|
||||||
|
import os
|
||||||
|
|
||||||
from artiq.protocols.file_db import FlatFileDB
|
from artiq.protocols.file_db import FlatFileDB
|
||||||
from artiq.protocols.pc_rpc import AsyncioClient
|
from artiq.protocols.pc_rpc import AsyncioClient
|
||||||
|
@ -17,6 +18,8 @@ from artiq.gui.parameters import ParametersDock
|
||||||
from artiq.gui.schedule import ScheduleDock
|
from artiq.gui.schedule import ScheduleDock
|
||||||
from artiq.gui.log import LogDock
|
from artiq.gui.log import LogDock
|
||||||
|
|
||||||
|
data_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)),
|
||||||
|
"..", "gui")
|
||||||
|
|
||||||
def get_argparser():
|
def get_argparser():
|
||||||
parser = argparse.ArgumentParser(description="ARTIQ GUI client")
|
parser = argparse.ArgumentParser(description="ARTIQ GUI client")
|
||||||
|
@ -51,6 +54,7 @@ def main():
|
||||||
atexit.register(lambda: schedule_ctl.close_rpc())
|
atexit.register(lambda: schedule_ctl.close_rpc())
|
||||||
|
|
||||||
win = QtGui.QMainWindow()
|
win = QtGui.QMainWindow()
|
||||||
|
win.setWindowIcon(QtGui.QIcon(os.path.join(data_dir, "icon.png")))
|
||||||
area = dockarea.DockArea()
|
area = dockarea.DockArea()
|
||||||
win.setCentralWidget(area)
|
win.setCentralWidget(area)
|
||||||
status_bar = QtGui.QStatusBar()
|
status_bar = QtGui.QStatusBar()
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
2
setup.py
2
setup.py
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
if sys.version_info[:3] < (3, 4, 3):
|
if sys.version_info[:3] < (3, 4, 3):
|
||||||
raise Exception("You need at least Python 3.4.3 to run ARTIQ")
|
raise Exception("You need at least Python 3.4.3 to run ARTIQ")
|
||||||
|
@ -44,6 +45,7 @@ setup(
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
namespace_packages=[],
|
namespace_packages=[],
|
||||||
test_suite="artiq.test",
|
test_suite="artiq.test",
|
||||||
|
package_data={"artiq": [os.path.join("gui", "icon.png")]},
|
||||||
ext_modules=[],
|
ext_modules=[],
|
||||||
entry_points={
|
entry_points={
|
||||||
"console_scripts": scripts,
|
"console_scripts": scripts,
|
||||||
|
|
Loading…
Reference in New Issue