Minor optimization: do not query full name of ResourceItem when only
computing suffix via QFileInfo in ResourceItem::guessType().
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added initial version of ResourcePreviewer, a replacement for the old
PresetPreviewPlayHandle technology. It can take any ResourceItem and
preview it depending on its type.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
For a long time presetPreviewPlayHandle has been a friend class of
InstrumentTrack as it had to modify MidiPort settings. However the
InstrumentTrack's MidiPort is now accessible via getMidiPort() so
there's no need for keeping presetPreviewPlayHandle a friend class
anymore.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
The old constructor treated the string argument either as filename or
as raw XML data, depending on 2nd parameter. This is a mess and quickly
leads to confusion.
Now we have two constructors taking either a filename as string or a
QByteArray with XML data. Loading actual data has been separated into
MultimediaProject::loadData( const QByteArray & ).
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Commit ea2b165cbd was incomplete.
Fixed some #include statements. All compile errors should be gone now.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Naming classes like ResourcesItem or ResourcesDatabase is bad style,
therefore rename all classes and files to be Resource*.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Filter line-edit is now placed above actual tree view and has been
decorated with a small icon as well as a status label, displaying the
number of filtered and total number of items.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Make a direct signal-slot-connection between
ResourcesDatebase::itemsChanged() of merged databases and
UnifiedResourcesProvider::remergeItems() for instantly updating items
in unified database.
Also call remergeItems() before emitting global itemsChanged() signal.
Furthermore instantly call remergeItems() after adding a new database.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added addContentLayout(QLayout *) method to SideBarWidget in order to
allow subclasses to add whole layouts as well.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Implemented context menu for ResourcesBrowser with various actions
inside depending on selected item.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Encapsulate conversion from a QModelIndex to a ResourcesTreeItem
or a ResourcesItem into static methods.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added isLocalResource() method which returns whether it belongs to a
local ResourcesProvider or not.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added isLocal() method for returning whether according provider class
provides local resources or not (will allow a download option for
non-local resources later).
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Added a new class ResourcesBrowser which represents a complete view
for browsing all available resources. It only allows filtering at the
moment but more features will follow soon.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Proteus VX requires SplittedThreading model in order to run properly.
Issues with actually working UI interaction still need to be worked
out although it rather looks like a bug in WINE.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Automatically select either controller or key group box in
MidiControlListener new action dialog if the user changes something
inside the group.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Instead of doing a whole string comparison against "", use
QString::isEmpty() which is both faster and better style.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
It's not a good idea to have a separate constant determining the number
of items in an enumeration because you can easily get inconsistencies.
Use the last element of enumeration as NumActions constant instead.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Sizing of the columns in the action table corrected in the
setup dialog for MidiControlListener.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This adds some nearly-standard keys and controllers to give new users
a hint how the MIDI remote control works.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Implements the MCL actions JumpToLoopStart and JumpToLoopEnd which
update the position in the via the timeLine object.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
MidiControlListener's toggleLoop action makes the song object emit a
loopPointsChanged signal, which timeLine connects to and enables or
disables the loop points accordingly.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Fixed compilation failure of FLTK on systems with glibc newer than
version 2.9 where the signature of scandir(...) has changed.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Fixed compilation failure of FLTK on broken systems where strchr()
takes a non-const char pointer.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Fixed invocation of cmake in the MinGW cross compiling script so it
works properly when doing an out-of-tree build (which should be the
default way of building LMMS).
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
LMMS didn't compile successfully if individual paths to headers of
each Qt module were not added to the list of include directories to be
searched by the pre-processor. However it has to work this way,
therefore I changed lines like
#include <QGraphicsScene>
to
#include <QtGui/QGraphicsScene>
Please care in the future!
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Processed all Fluid UI files with Fluid from FLTK 1.3 branch so the
generated code is up to date.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Integrated FLTK 1.3.0 branch from SVN which brings UTF8 support and
fully integrated Xft support (SVN rev. 6791).
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Do not save configuration file in destructor of ConfigManager as
at this place the whole LMMS engine already has been shutdown and
thus saving e.g. configuration of MidiControlListener causes a
segfault. Instead explicitely save configuration file at the
beginning of Engine::destroy().
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
The MIDI device(s) where the MidiControlListener can receive events from
can now be configured in the setup dialog.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Moved the code to unsubscribe all readable and/or writeable ports to own
methods and thus made them publically available to avoid duplicate code.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Changed MidiControlListener to use the built-in API to save and restore
the midiPort configuration instead and removed the old iterator.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Introduces a new class, DummyMidiEventProcessor, that does nothing but
update the baseNoteModel upon keypress.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Removed a crappy outdated unfinished project by Skiessi, which he
is about to replace with something better, maybe.
How can I change the favourite editor of git?
elementsByTagName() may return an empty list thought there should be
elements. As the reason and circumstances of the method for doing so
are unclear, an iterator approach is used instead
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Adds GUI elements to the global setup dialog to configure remote
controlling of LMMS via MIDI. The GUI is not yet fully functional,
though.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Moved baseNoteModel from InstrumentTrack class to MidiEventProcessor
class in order to make Piano class independent from InstrumentTrack
class (so it can be used by other classes as well).
Furthermore did various cleanups and coding style improvements.
When invoking C compiler to build our assembler files evaluate first
compiler argument and fix it if neccessary). This allows building
master branch with distcc.
Due to optimizations in Qt 4.5 setting Qt::WA_OpaquePaintEvent attribute
for TrackView widgets caused a line of distorted pixels at the bottom of
the left part so do not set this attribute anymore (closes#2795861).