Browse Source

Misc

tags/v0.9.0
falkTX 13 years ago
parent
commit
649dae30d8
3 changed files with 644 additions and 0 deletions
  1. +5
    -0
      Makefile
  2. +504
    -0
      resources/ui/caitlyn.ui
  3. +135
    -0
      src/caitlyn.py

+ 5
- 0
Makefile View File

@@ -46,6 +46,8 @@ carla: src/ui_carla.py src/ui_carla_control.py \
src/ui_carla_about.py src/ui_carla_database.py src/ui_carla_edit.py src/ui_carla_parameter.py src/ui_carla_plugin.py src/ui_carla_refresh.py \
src/ui_inputdialog_value.py

caitlyn: src/ui_caitlyn.py

tools: \
src/ui_logs.py src/ui_render.py \
src/ui_settings_app.py src/ui_settings_jack.py
@@ -125,6 +127,9 @@ src/ui_claudia_launcher.py: resources/ui/claudia_launcher.ui
src/ui_claudia_launcher_app.py: resources/ui/claudia_launcher_app.ui
$(PYUIC) $< -o $@

src/ui_caitlyn.py: resources/ui/caitlyn.ui
$(PYUIC) $< -o $@

src/ui_carla.py: resources/ui/carla.ui
$(PYUIC) $< -o $@



+ 504
- 0
resources/ui/caitlyn.ui View File

@@ -0,0 +1,504 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CaitlynMainW</class>
<widget class="QMainWindow" name="CaitlynMainW">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>712</width>
<height>445</height>
</rect>
</property>
<property name="windowTitle">
<string>Caitlyn</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGraphicsView" name="graphicsView">
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
</widget>
</item>
</layout>
</widget>
<action name="act_quit">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/application-exit.png</normaloff>:/16x16/application-exit.png</iconset>
</property>
<property name="text">
<string>&amp;Quit</string>
</property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
</action>
<action name="act_session_new">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-new.png</normaloff>:/16x16/document-new.png</iconset>
</property>
<property name="text">
<string>&amp;New...</string>
</property>
<property name="shortcut">
<string>Ctrl+N</string>
</property>
</action>
<action name="act_session_open">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-open.png</normaloff>:/16x16/document-open.png</iconset>
</property>
<property name="text">
<string>&amp;Open...</string>
</property>
<property name="shortcut">
<string>Ctrl+O</string>
</property>
</action>
<action name="act_session_save">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-save.png</normaloff>:/16x16/document-save.png</iconset>
</property>
<property name="text">
<string>&amp;Save</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action>
<action name="act_session_save_as">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-save-as.png</normaloff>:/16x16/document-save-as.png</iconset>
</property>
<property name="text">
<string>Save &amp;As...</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+S</string>
</property>
</action>
<action name="action1">
<property name="text">
<string>1</string>
</property>
</action>
<action name="act_help_about">
<property name="text">
<string>&amp;About Catia</string>
</property>
</action>
<action name="act_transport_play">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/media-playback-start.png</normaloff>:/16x16/media-playback-start.png</iconset>
</property>
<property name="text">
<string>&amp;Play</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+P</string>
</property>
</action>
<action name="act_transport_stop">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/media-playback-stop.png</normaloff>:/16x16/media-playback-stop.png</iconset>
</property>
<property name="text">
<string>&amp;Stop</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+X</string>
</property>
</action>
<action name="act_transport_backwards">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/media-seek-backward.png</normaloff>:/16x16/media-seek-backward.png</iconset>
</property>
<property name="text">
<string>&amp;Backwards</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+B</string>
</property>
</action>
<action name="act_transport_forwards">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/media-seek-forward.png</normaloff>:/16x16/media-seek-forward.png</iconset>
</property>
<property name="text">
<string>&amp;Forwards</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+F</string>
</property>
</action>
<action name="act_canvas_refresh">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/view-refresh.png</normaloff>:/16x16/view-refresh.png</iconset>
</property>
<property name="text">
<string>&amp;Refresh</string>
</property>
<property name="shortcut">
<string>Ctrl+R</string>
</property>
</action>
<action name="act_canvas_arrange">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/view-sort-ascending.png</normaloff>:/16x16/view-sort-ascending.png</iconset>
</property>
<property name="text">
<string>&amp;Arrange</string>
</property>
<property name="shortcut">
<string>Ctrl+G</string>
</property>
</action>
<action name="act_canvas_zoom_fit">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/zoom-fit-best.png</normaloff>:/16x16/zoom-fit-best.png</iconset>
</property>
<property name="text">
<string>Auto-Fit</string>
</property>
</action>
<action name="act_canvas_zoom_in">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/zoom-in.png</normaloff>:/16x16/zoom-in.png</iconset>
</property>
<property name="text">
<string>Zoom In</string>
</property>
<property name="shortcut">
<string>Ctrl++</string>
</property>
</action>
<action name="act_canvas_zoom_out">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/zoom-out.png</normaloff>:/16x16/zoom-out.png</iconset>
</property>
<property name="text">
<string>Zoom Out</string>
</property>
<property name="shortcut">
<string>Ctrl+-</string>
</property>
</action>
<action name="act_canvas_zoom_100">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/zoom-original.png</normaloff>:/16x16/zoom-original.png</iconset>
</property>
<property name="text">
<string>Zoom 100%</string>
</property>
<property name="shortcut">
<string>Ctrl+1</string>
</property>
</action>
<action name="act_jack_clear_xruns">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/edit-clear.png</normaloff>:/16x16/edit-clear.png</iconset>
</property>
<property name="text">
<string>Clear &amp;Xruns</string>
</property>
</action>
<action name="act_jack_configure">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/configure.png</normaloff>:/16x16/configure.png</iconset>
</property>
<property name="text">
<string>Configure JACK</string>
</property>
</action>
<action name="actionConfigure_Canvas">
<property name="text">
<string>Configure Canvas</string>
</property>
</action>
<action name="act_settings_show_toolbar">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show Toolbar</string>
</property>
</action>
<action name="act_settings_show_statusbar">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show Statusbar</string>
</property>
</action>
<action name="act_configure">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/configure.png</normaloff>:/16x16/configure.png</iconset>
</property>
<property name="text">
<string>Configure Catia</string>
</property>
<property name="shortcut">
<string>Ctrl+P</string>
</property>
</action>
<action name="act_tools_jack_start">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/media-playback-start.png</normaloff>:/16x16/media-playback-start.png</iconset>
</property>
<property name="text">
<string>Start JACK Server</string>
</property>
<property name="shortcut">
<string>F5</string>
</property>
</action>
<action name="act_tools_jack_stop">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/media-playback-stop.png</normaloff>:/16x16/media-playback-stop.png</iconset>
</property>
<property name="text">
<string>Stop JACK Server</string>
</property>
<property name="shortcut">
<string>F6</string>
</property>
</action>
<action name="act_jack_bf_32">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>32</string>
</property>
</action>
<action name="act_jack_bf_64">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>64</string>
</property>
</action>
<action name="act_jack_bf_128">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>128</string>
</property>
</action>
<action name="act_jack_bf_256">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>256</string>
</property>
</action>
<action name="act_jack_bf_512">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>512</string>
</property>
</action>
<action name="act_jack_bf_1024">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>1024</string>
</property>
</action>
<action name="act_jack_bf_2048">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>2048</string>
</property>
</action>
<action name="act_jack_bf_4096">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>4096</string>
</property>
</action>
<action name="act_jack_bf_8192">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>8192</string>
</property>
</action>
<action name="act_tools_a2j_start">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/media-playback-start.png</normaloff>:/16x16/media-playback-start.png</iconset>
</property>
<property name="text">
<string>Start A2J Bridge</string>
</property>
<property name="shortcut">
<string>F7</string>
</property>
</action>
<action name="act_tools_a2j_stop">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/media-playback-stop.png</normaloff>:/16x16/media-playback-stop.png</iconset>
</property>
<property name="text">
<string>Stop A2J Bridge</string>
</property>
<property name="shortcut">
<string>F8</string>
</property>
</action>
<action name="act_tools_a2j_export_hw">
<property name="text">
<string>Export Hardware Ports...</string>
</property>
</action>
<action name="act_session_save_as_template">
<property name="text">
<string>Save As &amp;Template...</string>
</property>
</action>
<action name="act_canvas_print">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/document-print.png</normaloff>:/16x16/document-print.png</iconset>
</property>
<property name="text">
<string>&amp;Print...</string>
</property>
</action>
<action name="act_canvas_save_image">
<property name="text">
<string>Save &amp;Image...</string>
</property>
</action>
<action name="act_canvas_undo">
<property name="icon">
<iconset>
<normaloff>:/16x16/edit-undo.png</normaloff>:/16x16/edit-undo.png</iconset>
</property>
<property name="text">
<string>Undo</string>
</property>
</action>
<action name="act_canvas_redo">
<property name="icon">
<iconset>
<normaloff>:/16x16/edit-redo.png</normaloff>:/16x16/edit-redo.png</iconset>
</property>
<property name="text">
<string>Redo</string>
</property>
</action>
<action name="act_help_about_qt">
<property name="text">
<string>About Qt</string>
</property>
</action>
<action name="act_canvas_configure">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/configure.png</normaloff>:/16x16/configure.png</iconset>
</property>
<property name="text">
<string>Configure Canvas</string>
</property>
</action>
<action name="actionSync_Now">
<property name="text">
<string>Sync Now</string>
</property>
</action>
<action name="action_session_recent_none">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>(none)</string>
</property>
</action>
<action name="act_jack_render">
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/16x16/media-record.png</normaloff>:/16x16/media-record.png</iconset>
</property>
<property name="text">
<string>JACK &amp;Render</string>
</property>
</action>
<action name="act_show_logs">
<property name="text">
<string>&amp;Logs</string>
</property>
</action>
<action name="act_jack_bf_16">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>16</string>
</property>
</action>
</widget>
<resources>
<include location="../resources.qrc"/>
</resources>
<connections>
<connection>
<sender>act_quit</sender>
<signal>triggered()</signal>
<receiver>CaitlynMainW</receiver>
<slot>close()</slot>
<hints>
<hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
<hint type="destinationlabel">
<x>336</x>
<y>291</y>
</hint>
</hints>
</connection>
</connections>
</ui>

+ 135
- 0
src/caitlyn.py View File

@@ -0,0 +1,135 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# JACK Sequencer
# Copyright (C) 2012 Filipe Coelho <falktx@falktx.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# For a full copy of the GNU General Public License see the COPYING file

# Imports (Global)
from PyQt4.QtCore import qFatal, QSettings
from PyQt4.QtCore import QLineF, QPointF, QRectF, QSizeF
from PyQt4.QtGui import QGraphicsItem, QGraphicsScene
from PyQt4.QtGui import QPainter
from PyQt4.QtGui import QApplication, QMainWindow

# Imports (Custom Stuff)
import ui_caitlyn
from shared_settings import *

try:
from PyQt4.QtOpenGL import QGLWidget
hasGL = True
except:
hasGL = False

# ------------------------------------------------------------------------------
# Caitlyn Qt Graphics Scene

class CaitlynCanvasScene(QGraphicsScene):
def __init__(self, parent, view):
QGraphicsScene.__init__(self, parent)

self.m_view = view
if not self.m_view:
qFatal("CaitlynCanvasScene() - invalid view")

# ------------------------------------------------------------------------------
# Caitlyn items

class CaitlynCanvasTimelineTopBar(QGraphicsItem):
def __init__(self, scene, parent=None):
QGraphicsItem.__init__(self, parent, scene)

# horizontal length, matches min(full length of song, window)
self.m_length = 100

def boundingRect(self):
return QRectF(0, 0, self.m_length*4, 4)

def paint(self, painter, option, widget):
painter.setRenderHint(QPainter.Antialiasing, False)

painter.drawRect(0, 0, self.m_length*14, 16)

class CaitlynCanvasBox(QGraphicsItem):
def __init__(self, scene, parent=None):
QGraphicsItem.__init__(self, parent, scene)

self.m_length = 1.0

def length(self):
return self.m_length

def boundingRect(self):
return QRectF(0, 0, self.m_length*4, 4)

def paint(self, painter, option, widget):
painter.setRenderHint(QPainter.Antialiasing, False)

painter.drawRect(0, 0, self.m_length*14, 16)

# ------------------------------------------------------------------------------
# Caitlyn Main Window

class CaitlynMainW(QMainWindow, ui_caitlyn.Ui_CaitlynMainW):
def __init__(self, parent=None):
QMainWindow.__init__(self, parent)
self.setupUi(self)

self.settings = QSettings("Cadence", "Caitlyn")
self.loadSettings(True)

self.scene = CaitlynCanvasScene(self, self.graphicsView)
self.graphicsView.setScene(self.scene)
self.graphicsView.setRenderHint(QPainter.Antialiasing, False)
self.graphicsView.setRenderHint(QPainter.TextAntialiasing, False)

self.item1 = CaitlynCanvasBox(self.scene)

def saveSettings(self):
self.settings.setValue("Geometry", self.saveGeometry())

def loadSettings(self, geometry):
if geometry:
self.restoreGeometry(self.settings.value("Geometry", ""))

self.m_savedSettings = {
"Main/RefreshInterval": self.settings.value("Main/RefreshInterval", 120, type=int)
}

def closeEvent(self, event):
self.scene.removeItem(self.item1)

self.saveSettings()
QMainWindow.closeEvent(self, event)

#--------------- main ------------------
if __name__ == '__main__':
# App initialization
app = QApplication(sys.argv)
app.setApplicationName("Caitlyn")
app.setApplicationVersion(VERSION)
app.setOrganizationName("Cadence")
#app.setWindowIcon(QIcon(":/scalable/caitlyn.svg"))

# Show GUI
gui = CaitlynMainW()

# Set-up custom signal handling
setUpSignals(gui)

gui.show()

# App-Loop and exit
sys.exit(app.exec_())

Loading…
Cancel
Save