From: slack Date: Wed, 10 Jun 2009 16:49:09 +0000 (+0200) Subject: Switched from a qt-creator project to a plain CMake one X-Git-Url: http://slack.codemaniacs.com/git/?a=commitdiff_plain;h=495801c54eb91f4dc6ec43f872c036f54d291bf7;p=lolailo.git Switched from a qt-creator project to a plain CMake one --- diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..433db7c --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,23 @@ +PROJECT(lolailo) +cmake_minimum_required(VERSION 2.6) +FIND_PACKAGE(Qt4 REQUIRED) +FIND_PACKAGE(SDL REQUIRED) +INCLUDE( ${QT_USE_FILE} ) + +SET(LOLAILO_MOC_HDRS + mainwindow.h + trackerwindow.h +) + +SET(LOLAILO_SOURCES + lolailo.cpp + mainwindow.cpp + play.cpp + synth.cpp + trackerwindow.cpp +) + +QT4_WRAP_CPP(LOLAILO_MOC_SRCS ${LOLAILO_MOC_HDRS}) +ADD_EXECUTABLE(lolailo ${LOLAILO_SOURCES} ${LOLAILO_MOC_SRCS}) +TARGET_LINK_LIBRARIES(lolailo ${QT_LIBRARIES} ${SDL_LIBRARY} SDLmain) + diff --git a/Makefile b/Makefile deleted file mode 100644 index 4773754..0000000 --- a/Makefile +++ /dev/null @@ -1,226 +0,0 @@ -############################################################################# -# Makefile for building: lolailo -# Generated by qmake (2.01a) (Qt 4.5.0) on: miƩ jun 3 02:08:55 2009 -# Project: lolailo.pro -# Template: app -# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile lolailo.pro -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = g++ -DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES) -CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES) -INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -LINK = g++ -LFLAGS = -LIBS = $(SUBLIBS) -L/usr/lib -lSDL -lQtGui -lQtCore -lpthread -AR = ar cqs -RANLIB = -QMAKE = /usr/bin/qmake-qt4 -TAR = tar -cf -COMPRESS = gzip -9f -COPY = cp -f -SED = sed -COPY_FILE = $(COPY) -COPY_DIR = $(COPY) -r -INSTALL_FILE = install -m 644 -p -INSTALL_DIR = $(COPY_DIR) -INSTALL_PROGRAM = install -m 755 -p -DEL_FILE = rm -f -SYMLINK = ln -sf -DEL_DIR = rmdir -MOVE = mv -f -CHK_DIR_EXISTS= test -d -MKDIR = mkdir -p - -####### Output directory - -OBJECTS_DIR = ./ - -####### Files - -SOURCES = main.cpp \ - mainwindow.cpp \ - synth.cpp \ - play.cpp moc_mainwindow.cpp -OBJECTS = main.o \ - mainwindow.o \ - synth.o \ - play.o \ - moc_mainwindow.o -DIST = /usr/share/qt4/mkspecs/common/g++.conf \ - /usr/share/qt4/mkspecs/common/unix.conf \ - /usr/share/qt4/mkspecs/common/linux.conf \ - /usr/share/qt4/mkspecs/qconfig.pri \ - /usr/share/qt4/mkspecs/features/qt_functions.prf \ - /usr/share/qt4/mkspecs/features/qt_config.prf \ - /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ - /usr/share/qt4/mkspecs/features/default_pre.prf \ - /usr/share/qt4/mkspecs/features/debug.prf \ - /usr/share/qt4/mkspecs/features/default_post.prf \ - /usr/share/qt4/mkspecs/features/link_pkgconfig.prf \ - /usr/share/qt4/mkspecs/features/warn_on.prf \ - /usr/share/qt4/mkspecs/features/qt.prf \ - /usr/share/qt4/mkspecs/features/unix/thread.prf \ - /usr/share/qt4/mkspecs/features/moc.prf \ - /usr/share/qt4/mkspecs/features/resources.prf \ - /usr/share/qt4/mkspecs/features/uic.prf \ - /usr/share/qt4/mkspecs/features/yacc.prf \ - /usr/share/qt4/mkspecs/features/lex.prf \ - lolailo.pro -QMAKE_TARGET = lolailo -DESTDIR = -TARGET = lolailo - -first: all -####### Implicit rules - -.SUFFIXES: .o .c .cpp .cc .cxx .C - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" - -####### Build rules - -all: Makefile $(TARGET) - -$(TARGET): ui_mainwindow.h $(OBJECTS) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) - -Makefile: lolailo.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \ - /usr/share/qt4/mkspecs/common/unix.conf \ - /usr/share/qt4/mkspecs/common/linux.conf \ - /usr/share/qt4/mkspecs/qconfig.pri \ - /usr/share/qt4/mkspecs/features/qt_functions.prf \ - /usr/share/qt4/mkspecs/features/qt_config.prf \ - /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ - /usr/share/qt4/mkspecs/features/default_pre.prf \ - /usr/share/qt4/mkspecs/features/debug.prf \ - /usr/share/qt4/mkspecs/features/default_post.prf \ - /usr/share/qt4/mkspecs/features/link_pkgconfig.prf \ - /usr/share/qt4/mkspecs/features/warn_on.prf \ - /usr/share/qt4/mkspecs/features/qt.prf \ - /usr/share/qt4/mkspecs/features/unix/thread.prf \ - /usr/share/qt4/mkspecs/features/moc.prf \ - /usr/share/qt4/mkspecs/features/resources.prf \ - /usr/share/qt4/mkspecs/features/uic.prf \ - /usr/share/qt4/mkspecs/features/yacc.prf \ - /usr/share/qt4/mkspecs/features/lex.prf \ - /usr/lib/libQtGui.prl \ - /usr/lib/libQtCore.prl - $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile lolailo.pro -/usr/share/qt4/mkspecs/common/g++.conf: -/usr/share/qt4/mkspecs/common/unix.conf: -/usr/share/qt4/mkspecs/common/linux.conf: -/usr/share/qt4/mkspecs/qconfig.pri: -/usr/share/qt4/mkspecs/features/qt_functions.prf: -/usr/share/qt4/mkspecs/features/qt_config.prf: -/usr/share/qt4/mkspecs/features/exclusive_builds.prf: -/usr/share/qt4/mkspecs/features/default_pre.prf: -/usr/share/qt4/mkspecs/features/debug.prf: -/usr/share/qt4/mkspecs/features/default_post.prf: -/usr/share/qt4/mkspecs/features/link_pkgconfig.prf: -/usr/share/qt4/mkspecs/features/warn_on.prf: -/usr/share/qt4/mkspecs/features/qt.prf: -/usr/share/qt4/mkspecs/features/unix/thread.prf: -/usr/share/qt4/mkspecs/features/moc.prf: -/usr/share/qt4/mkspecs/features/resources.prf: -/usr/share/qt4/mkspecs/features/uic.prf: -/usr/share/qt4/mkspecs/features/yacc.prf: -/usr/share/qt4/mkspecs/features/lex.prf: -/usr/lib/libQtGui.prl: -/usr/lib/libQtCore.prl: -qmake: FORCE - @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile lolailo.pro - -dist: - @$(CHK_DIR_EXISTS) .tmp/lolailo1.0.0 || $(MKDIR) .tmp/lolailo1.0.0 - $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/lolailo1.0.0/ && $(COPY_FILE) --parents mainwindow.h synth.h play.h .tmp/lolailo1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp synth.cpp play.cpp .tmp/lolailo1.0.0/ && $(COPY_FILE) --parents mainwindow.ui .tmp/lolailo1.0.0/ && (cd `dirname .tmp/lolailo1.0.0` && $(TAR) lolailo1.0.0.tar lolailo1.0.0 && $(COMPRESS) lolailo1.0.0.tar) && $(MOVE) `dirname .tmp/lolailo1.0.0`/lolailo1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/lolailo1.0.0 - - -clean:compiler_clean - -$(DEL_FILE) $(OBJECTS) - -$(DEL_FILE) *~ core *.core - - -####### Sub-libraries - -distclean: clean - -$(DEL_FILE) $(TARGET) - -$(DEL_FILE) Makefile - - -mocclean: compiler_moc_header_clean compiler_moc_source_clean - -mocables: compiler_moc_header_make_all compiler_moc_source_make_all - -compiler_moc_header_make_all: moc_mainwindow.cpp -compiler_moc_header_clean: - -$(DEL_FILE) moc_mainwindow.cpp -moc_mainwindow.cpp: mainwindow.h - /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp - -compiler_rcc_make_all: -compiler_rcc_clean: -compiler_image_collection_make_all: qmake_image_collection.cpp -compiler_image_collection_clean: - -$(DEL_FILE) qmake_image_collection.cpp -compiler_moc_source_make_all: -compiler_moc_source_clean: -compiler_uic_make_all: ui_mainwindow.h -compiler_uic_clean: - -$(DEL_FILE) ui_mainwindow.h -ui_mainwindow.h: mainwindow.ui - /usr/bin/uic-qt4 mainwindow.ui -o ui_mainwindow.h - -compiler_yacc_decl_make_all: -compiler_yacc_decl_clean: -compiler_yacc_impl_make_all: -compiler_yacc_impl_clean: -compiler_lex_make_all: -compiler_lex_clean: -compiler_clean: compiler_moc_header_clean compiler_uic_clean - -####### Compile - -main.o: main.cpp mainwindow.h \ - synth.h \ - play.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp - -mainwindow.o: mainwindow.cpp mainwindow.h \ - ui_mainwindow.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp - -synth.o: synth.cpp synth.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o synth.o synth.cpp - -play.o: play.cpp play.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o play.o play.cpp - -moc_mainwindow.o: moc_mainwindow.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp - -####### Install - -install: FORCE - -uninstall: FORCE - -FORCE: - diff --git a/main.cpp b/lolailo.cpp similarity index 96% rename from main.cpp rename to lolailo.cpp index b2f5e4a..473fba1 100644 --- a/main.cpp +++ b/lolailo.cpp @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) SDL_PauseAudio(0); QApplication a(argc, argv); - MainWindow w; + MainWindow w(NULL); w.show(); int error = a.exec(); SDL_Quit(); diff --git a/lolailo.pro b/lolailo.pro deleted file mode 100644 index ff3476c..0000000 --- a/lolailo.pro +++ /dev/null @@ -1,16 +0,0 @@ -# ------------------------------------------------- -# Project created by QtCreator 2009-06-03T01:10:35 -# ------------------------------------------------- -TARGET = lolailo -TEMPLATE = app -SOURCES += main.cpp \ - mainwindow.cpp \ - synth.cpp \ - play.cpp -HEADERS += mainwindow.h \ - synth.h \ - play.h -FORMS += mainwindow.ui -CONFIG += link_pkgconfig -LIBS += -lSDL -PKG_CONFIG += sdl diff --git a/lolailo.pro.user b/lolailo.pro.user deleted file mode 100644 index c551d7a..0000000 --- a/lolailo.pro.user +++ /dev/null @@ -1,331 +0,0 @@ - - - - RunConfiguration0-BaseEnvironmentBase - 2 - - - RunConfiguration0-CommandLineArguments - - - - RunConfiguration0-ProFile - lolailo.pro - - - RunConfiguration0-RunConfiguration.name - lolailo - - - RunConfiguration0-UseDyldImageSuffix - false - - - RunConfiguration0-UseTerminal - false - - - RunConfiguration0-UserEnvironmentChanges - - - - RunConfiguration0-UserSetName - false - - - RunConfiguration0-type - Qt4ProjectManager.Qt4RunConfiguration - - - activeRunConfiguration - 0 - - - activebuildconfiguration - Debug - - - buildConfiguration-Debug - - Debug - 0 - - - - - buildConfiguration-Release - - Release - 0 - - - - - buildconfiguration-Debug-buildstep0 - - Debug - - COLORTERM=gnome-terminal - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-e9WQoxtZb2,guid=326f2445091ad0a27309de634a25ac3c - DESKTOP_SESSION=default - DESKTOP_STARTUP_ID= - DEVKITARM=/home/slack/devkitPro/devkitARM - DEVKITPPC=/home/slack/devkitPro/devkitPPC - DEVKITPRO=/home/slack/devkitPro - DISPLAY=:0.0 - EDITOR=/usr/bin/vim - GDMSESSION=default - GDM_LANG=es_ES.UTF-8 - GDM_XSERVER_LOCATION=local - GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_PID=22024 - GNOME_KEYRING_SOCKET=/tmp/keyring-oI8emD/socket - GPG_AGENT_INFO=/tmp/seahorse-7JJz7C/S.gpg-agent:22210:1 - GTK_MODULES=canberra-gtk-module - GTK_RC_FILES=/etc/gtk/gtkrc:/home/slack/.gtkrc-1.2-gnome2 - HISTCONTROL=ignoredups - HOME=/home/slack - LANG=es_ES.UTF-8 - LD_LIBRARY_PATH=/home/slack/soft/qt-creator/build/lib/qtcreator::/home/slack/local/lib:/home/slack/local/usr/lib:/home/slack/local/lib64:/home/slack/local/lib32 - LESSCLOSE=/usr/bin/lesspipe %s %s - LESSOPEN=| /usr/bin/lesspipe %s - LIBNDS=/home/slack/devkitPro/libnds - LIBNDS_INCLUDE=/home/slack/devkitPro/libnds/include - LIBNDS_LIB=/home/slack/devkitPro/libnds/lib - LOGNAME=slack - LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36: - OLDPWD=/home/slack/soft/qt-creator - ORBIT_SOCKETDIR=/tmp/orbit-slack - PAPATH=/home/slack/NDS/devkitPro/PAlib - PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/home/slack/local/sbin:/home/slack/local/bin:/home/slack/local/usr/bin:/home/slack/devkitPro/devkitARM/bin:/home/slack/devkitPro/devkitPPC/bin:/home/slack/psp/bin:/home/slack/psp/pspsdk/bin - PSPDEV=/home/slack/psp - PSPSDK=/home/slack/psp/pspsdk - PWD=/home/slack/soft/qt-creator/build - QTDIR=/usr - SESSION_MANAGER=local/ommadawn:/tmp/.ICE-unix/22036 - SHELL=/bin/bash - SHLVL=1 - SSH_AGENT_PID=22150 - SSH_AUTH_SOCK=/tmp/keyring-oI8emD/socket.ssh - TERM=xterm - USER=slack - USERNAME=slack - WINDOWID=60861899 - WINDOWPATH=7:10 - XAUTHORITY=/home/slack/.Xauthority - XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/ - XDG_SESSION_COOKIE=b95e9de5c0255c87d4458400462bf263-1243982908.518998-392587063 - _=bin/qtcreator - - - /home/slack/soft/lolailo/lolailo.pro - -spec - /usr/share/qt4/mkspecs/linux-g++ - -r - CONFIG+=debug - - /usr/bin/qmake-qt4 - false - /home/slack/soft/lolailo - 2 - - - - buildconfiguration-Debug-buildstep1 - - Debug - - COLORTERM=gnome-terminal - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-e9WQoxtZb2,guid=326f2445091ad0a27309de634a25ac3c - DESKTOP_SESSION=default - DESKTOP_STARTUP_ID= - DEVKITARM=/home/slack/devkitPro/devkitARM - DEVKITPPC=/home/slack/devkitPro/devkitPPC - DEVKITPRO=/home/slack/devkitPro - DISPLAY=:0.0 - EDITOR=/usr/bin/vim - GDMSESSION=default - GDM_LANG=es_ES.UTF-8 - GDM_XSERVER_LOCATION=local - GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_PID=22024 - GNOME_KEYRING_SOCKET=/tmp/keyring-oI8emD/socket - GPG_AGENT_INFO=/tmp/seahorse-7JJz7C/S.gpg-agent:22210:1 - GTK_MODULES=canberra-gtk-module - GTK_RC_FILES=/etc/gtk/gtkrc:/home/slack/.gtkrc-1.2-gnome2 - HISTCONTROL=ignoredups - HOME=/home/slack - LANG=es_ES.UTF-8 - LD_LIBRARY_PATH=/home/slack/soft/qt-creator/build/lib/qtcreator::/home/slack/local/lib:/home/slack/local/usr/lib:/home/slack/local/lib64:/home/slack/local/lib32 - LESSCLOSE=/usr/bin/lesspipe %s %s - LESSOPEN=| /usr/bin/lesspipe %s - LIBNDS=/home/slack/devkitPro/libnds - LIBNDS_INCLUDE=/home/slack/devkitPro/libnds/include - LIBNDS_LIB=/home/slack/devkitPro/libnds/lib - LOGNAME=slack - LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36: - OLDPWD=/home/slack/soft/qt-creator - ORBIT_SOCKETDIR=/tmp/orbit-slack - PAPATH=/home/slack/NDS/devkitPro/PAlib - PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/home/slack/local/sbin:/home/slack/local/bin:/home/slack/local/usr/bin:/home/slack/devkitPro/devkitARM/bin:/home/slack/devkitPro/devkitPPC/bin:/home/slack/psp/bin:/home/slack/psp/pspsdk/bin - PSPDEV=/home/slack/psp - PSPSDK=/home/slack/psp/pspsdk - PWD=/home/slack/soft/qt-creator/build - QTDIR=/usr - SESSION_MANAGER=local/ommadawn:/tmp/.ICE-unix/22036 - SHELL=/bin/bash - SHLVL=1 - SSH_AGENT_PID=22150 - SSH_AUTH_SOCK=/tmp/keyring-oI8emD/socket.ssh - TERM=xterm - USER=slack - USERNAME=slack - WINDOWID=60861899 - WINDOWPATH=7:10 - XAUTHORITY=/home/slack/.Xauthority - XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/ - XDG_SESSION_COOKIE=b95e9de5c0255c87d4458400462bf263-1243982908.518998-392587063 - _=bin/qtcreator - - - -w - - /usr/bin/make - true - /home/slack/soft/lolailo - - - - buildconfiguration-Debug-cleanstep0 - - Debug - - COLORTERM=gnome-terminal - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-e9WQoxtZb2,guid=326f2445091ad0a27309de634a25ac3c - DESKTOP_SESSION=default - DESKTOP_STARTUP_ID= - DEVKITARM=/home/slack/devkitPro/devkitARM - DEVKITPPC=/home/slack/devkitPro/devkitPPC - DEVKITPRO=/home/slack/devkitPro - DISPLAY=:0.0 - EDITOR=/usr/bin/vim - GDMSESSION=default - GDM_LANG=es_ES.UTF-8 - GDM_XSERVER_LOCATION=local - GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_PID=22024 - GNOME_KEYRING_SOCKET=/tmp/keyring-oI8emD/socket - GPG_AGENT_INFO=/tmp/seahorse-7JJz7C/S.gpg-agent:22210:1 - GTK_MODULES=canberra-gtk-module - GTK_RC_FILES=/etc/gtk/gtkrc:/home/slack/.gtkrc-1.2-gnome2 - HISTCONTROL=ignoredups - HOME=/home/slack - LANG=es_ES.UTF-8 - LD_LIBRARY_PATH=/home/slack/soft/qt-creator/build/lib/qtcreator::/home/slack/local/lib:/home/slack/local/usr/lib:/home/slack/local/lib64:/home/slack/local/lib32 - LESSCLOSE=/usr/bin/lesspipe %s %s - LESSOPEN=| /usr/bin/lesspipe %s - LIBNDS=/home/slack/devkitPro/libnds - LIBNDS_INCLUDE=/home/slack/devkitPro/libnds/include - LIBNDS_LIB=/home/slack/devkitPro/libnds/lib - LOGNAME=slack - LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36: - OLDPWD=/home/slack/soft/qt-creator - ORBIT_SOCKETDIR=/tmp/orbit-slack - PAPATH=/home/slack/NDS/devkitPro/PAlib - PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/home/slack/local/sbin:/home/slack/local/bin:/home/slack/local/usr/bin:/home/slack/devkitPro/devkitARM/bin:/home/slack/devkitPro/devkitPPC/bin:/home/slack/psp/bin:/home/slack/psp/pspsdk/bin - PSPDEV=/home/slack/psp - PSPSDK=/home/slack/psp/pspsdk - PWD=/home/slack/soft/qt-creator/build - QTDIR=/usr - SESSION_MANAGER=local/ommadawn:/tmp/.ICE-unix/22036 - SHELL=/bin/bash - SHLVL=1 - SSH_AGENT_PID=22150 - SSH_AUTH_SOCK=/tmp/keyring-oI8emD/socket.ssh - TERM=xterm - USER=slack - USERNAME=slack - WINDOWID=60861899 - WINDOWPATH=7:10 - XAUTHORITY=/home/slack/.Xauthority - XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/ - XDG_SESSION_COOKIE=b95e9de5c0255c87d4458400462bf263-1243982908.518998-392587063 - _=bin/qtcreator - - - clean - -w - - /usr/bin/make - true - /home/slack/soft/lolailo - - - - buildconfiguration-Release-buildstep0 - - Release - 0 - - - - buildconfiguration-Release-buildstep1 - - Release - - - - buildconfiguration-Release-cleanstep0 - - Release - - - - buildconfigurations - - Debug - Release - - - - buildstep0 - - - - - - - buildstep1 - - - - - - buildsteps - - trolltech.qt4projectmanager.qmake - trolltech.qt4projectmanager.make - - - - cleanstep0 - - - true - - - - cleansteps - - trolltech.qt4projectmanager.make - - - - defaultFileEncoding - System - - - project - - - diff --git a/mainwindow.cpp b/mainwindow.cpp index d5841f4..0e168c1 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,13 +1,20 @@ #include "mainwindow.h" -#include "ui_mainwindow.h" -MainWindow::MainWindow(QWidget *parent) - : QMainWindow(parent), ui(new Ui::MainWindow) +MainWindow::MainWindow(QWidget *parent):QMainWindow(parent) { - ui->setupUi(this); + topLayout = new QVBoxLayout; + + centralWindow = new QWidget(this); + setCentralWidget(centralWindow); + centralWindow->setLayout(topLayout); + + tracker = new TrackerWindow(centralWindow); + topLayout->addWidget(tracker); + } MainWindow::~MainWindow() { - delete ui; } + + diff --git a/mainwindow.h b/mainwindow.h index c86b51a..1ce14e5 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,23 +1,25 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include +#include +#include +#include +#include +#include "trackerwindow.h" -namespace Ui -{ - class MainWindow; -} - -class MainWindow : public QMainWindow +class MainWindow: public QMainWindow { Q_OBJECT -public: - MainWindow(QWidget *parent = 0); - ~MainWindow(); + public: + MainWindow(QWidget *parent); + ~MainWindow(); -private: - Ui::MainWindow *ui; + private: + QWidget *centralWindow; + TrackerWindow *tracker; + QVBoxLayout *topLayout; }; -#endif // MAINWINDOW_H +#endif + diff --git a/mainwindow.ui b/mainwindow.ui deleted file mode 100644 index b1aab85..0000000 --- a/mainwindow.ui +++ /dev/null @@ -1,46 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 662 - 491 - - - - MainWindow - - - - - - - - - - - - 0 - 0 - 662 - 25 - - - - - - TopToolBarArea - - - false - - - - - - - - diff --git a/play.cpp b/play.cpp index 3e1a0db..0bfae32 100644 --- a/play.cpp +++ b/play.cpp @@ -5,6 +5,6 @@ void play(void *songdata, Uint8* stream, int len) { memset(stream, 0, len); - printf("Sound callback\n"); + //printf("Sound callback\n"); } diff --git a/synth.h b/synth.h index ad1b963..1c27c97 100644 --- a/synth.h +++ b/synth.h @@ -4,10 +4,11 @@ #include #define BUFFER_SIZE 1024 +#define MAX_OPS 30 /* - An instrument is defined by the concatenation of several operations, possibly with parameters - For example: + An instrument is defined a FORTH-like stack of several operations between waveforms, + possibly with parameters. For example: square_osc(wet=100%, pulse_width=50%) -> LP_filter(cutoff=4000 Hz, Q=0.1) -> Delay (5ms) @@ -29,6 +30,9 @@ struct Voice // 50 bytes should be enough for everyone. Anyway, voices will be created // at bss, so they don't count for the file size :) Uint8 status[50]; + + // buffers generated by wave operations + float waves[MAX_OPS][BUFFER_SIZE]; }; diff --git a/track.h b/track.h new file mode 100644 index 0000000..6a44678 --- /dev/null +++ b/track.h @@ -0,0 +1,10 @@ +#ifndef TRACK_H +#define TRACK_H + +class Track +{ +public: + Track(); +}; + +#endif // TRACK_H diff --git a/trackerwindow.cpp b/trackerwindow.cpp new file mode 100644 index 0000000..f5ee211 --- /dev/null +++ b/trackerwindow.cpp @@ -0,0 +1,13 @@ +#include "trackerwindow.h" +#include + +TrackerWindow::TrackerWindow(QWidget *parent):QWidget(parent) +{ +} + +void TrackerWindow::paintEvent(QPaintEvent *event) +{ + QPainter painter(this); + painter.drawText(200, 200,tr("LOL WUT")); + +} diff --git a/trackerwindow.h b/trackerwindow.h new file mode 100644 index 0000000..a8538af --- /dev/null +++ b/trackerwindow.h @@ -0,0 +1,18 @@ +#ifndef TRACKERWINDOW_H +#define TRACKERWINDOW_H + +#include +#include + +class TrackerWindow : public QWidget +{ + Q_OBJECT + + public: + TrackerWindow(QWidget *parent); + + private: + void paintEvent(QPaintEvent *); +}; + +#endif // TRACKERWINDOW_H