Commit Graph

856 Commits

Author SHA1 Message Date
Tobias Doerffel
8c9a9dd14c File and class renames part 1
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:

391 files changed, 25400 insertions(+), 25598 deletions(-)

Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.

Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
2009-08-24 17:59:28 +02:00
Tobias Doerffel
90e0cab629 QuickLoadDialog: implemented resource type filter
One can filter resource types now using the combobox. It's also possible
to pass a certain ResourceItem::Type to the QuickLoadDialog constructor
so the according type is preselected.
2009-08-22 01:17:03 +02:00
Tobias Doerffel
1c56bf4e55 ResourceItem: added descriptiveTypeName() method
The new ResourceItem::descriptiveTypeName() allows to query a
descriptive name for a given ResourceItem type.
2009-08-22 01:16:04 +02:00
Tobias Doerffel
beed7a6ee6 Moved UI files from src/gui/dialogs to src/gui/Forms and renamed files
All UI files are now located in src/gui/Forms and have been renamed.
Old classes using some of the forms (AboutDialog, ExportProjectDialog)
have been adapted to instantiate Ui::* instead of inheriting from it.
2009-08-22 00:18:23 +02:00
Tobias Doerffel
fe99a7a35c WelcomeScreen: implemented project loading functionality
It's now possible to load projects by clicking them in one of the
two lists (recent projects, recent community resources).
2009-08-21 23:48:33 +02:00
Tobias Doerffel
97e52de521 RecentResourceListModel: added item(QModelIndex) method
Added an item(QModelIndex) method to RecentResourceListModel which
maps given QModelIndex to source model and returns the according
ResourceItem from the source model.
2009-08-21 23:45:25 +02:00
Tobias Doerffel
0404cc760f MainWindow: integrated new WelcomeScreen widget
Initial integration of (not yet fully functional) WelcomeScreen.
2009-08-21 19:14:03 +02:00
Tobias Doerffel
34a20ba610 Added new WelcomeScreen widget
The new WelcomeScreen widget is intended to be shown after startup
by default. It allows the user to choose how to start the session,
i.e. shows a list of recently edited projects, a list of new stuff
at the Sharing Platform as well as some help related information and
links.
2009-08-21 19:11:40 +02:00
Tobias Doerffel
a5bf034575 RecentResourceListModel: new model providing resources sorted by date
RecentResourceListModel is a new proxy model which provides a list of
resources sorted by date (based on a ResourceListModel as source model).
2009-08-21 18:34:34 +02:00
Tobias Doerffel
0550132d1b Engine: provide individual ResourceDBs instead of one global provider
Pointers to individual ResourceDBs can be obtained from Engine now.
This allows for more specialized views and reduces complexity when
dealing with resources.
2009-08-21 18:17:32 +02:00
Tobias Doerffel
d3bb3ff13a ResourceModel: implement filter functionality
So far all subclasses implemented filtering on their own which doesn't
make much sense. Now one can set filter keywords and a filter type for
all ResourceModels. Subclasses simply have to call
ResourceModel::itemMatchesFilter( ResourceItem ) in order to determine
whether an item should be hidden or not. Additionally they have to
implement the updateFilters() method in order to update their internal
management data each time the filters change.
2009-08-21 18:10:38 +02:00
Tobias Doerffel
7bea6d0e07 MainWindow: renamed class to match new style
Renamed mainWindow to MainWindow and engine::getMainWindow() to
engine::mainWindow(). Additionally reduced some header dependencies.
2009-08-21 12:09:39 +02:00
Tobias Doerffel
c8d5497486 TreeRelation: fix compilation failure with older GCCs
Older GCCs do not allow scoping types for return value of functions.
Explicitely typedef a longer name to fix this.
2009-08-18 15:05:55 +02:00
Tobias Doerffel
0a6c187b86 MainWindow: initial integration of new QuickLoadDialog
This is an initial integration of the new QuickLoadDialog into LMMS.
One can either open up the dialog via Ctrl+L or the "Edit" menu.

The dialog is for testing only and not useful at all yet.
2009-08-18 00:29:17 +02:00
Tobias Doerffel
562688e845 QuickLoadDialog: initial version
This commit introduces initial version of the QuickLoadDialog.
It's a simple dialog with a filter line-edit as well as a ListView
showing all (filtered) ResourceItem's. Once integrated properly it'll
allow to quickly load a specific resource into current context, e.g. a
sample into AudioFileProcessor or a MIDI file into SongEditor.
2009-08-18 00:23:55 +02:00
Tobias Doerffel
cc987b2e6a ResourceListModel: new model providing resources in a flat list
The new ResourceListModel implements a ResourceModel to be used with
QListView & friends. It provides all items of the given ResourceDB as
a flat unsorted list. It'll be mainly used for the upcoming
QuickLoadDialog.

ResourceListModel features an internal lookup table, resulting in very
good performance when filtering (even with thousands of items).
2009-08-18 00:15:14 +02:00
Tobias Doerffel
13e9876b38 ResourceModel: made setFilter(...) a pure virtual public slot
Making setFilter(QString) a pure virtual public slot forces all derived
models to implement this slot. Furthermore it allows external GUI code
to connect e.g. QLineEdit::textChanged(QString) signal directly to the
setFilter(...) method.
2009-08-17 23:06:07 +02:00
Tobias Doerffel
38155d95c4 ResourceTreeModel: moved keyword matching code into ResourceItem class
Place functionality to where it belongs. ResourceItem::matchKeywords()
now returns whether a given list of strings matches with various
string properties of the item.
2009-08-17 22:15:51 +02:00
Tobias Doerffel
f873ad2693 ItemRelation: new template for making up relations between ResourceItems
The new generic ItemRelation template class replaces ResourceTreeItem's,
resulting in cleaner and better organized code.

In the future other kind of items can be linked hierarchically using
the ItemRelation template.
2009-08-17 20:44:36 +02:00
Tobias Doerffel
26be3b0e81 ResourceModel: made m_db pointer non-modifieable by subclasses
Subclasses have to call ResourceModel::db() now in order to get the
pointer to the DB, the model is operating on.
2009-08-17 17:14:03 +02:00
Tobias Doerffel
3110e2188d Resource[Tree]Model: moved common functionality into base class
All functionality which is not related to a ResourceTreeModel has been
moved into ResourceModel base class, allowing to share them in other
resource model implementations.
2009-08-17 16:53:14 +02:00
Tobias Doerffel
dd42518bb9 Resource[Tree]Item: made hidden-flag multi-model capable
The hidden flag has been moved from ResourceTreeItem to ResourceItem
and has been made multi-model capable, i.e. a ResourceModel pointer is
being used for looking up the flag in a hash table.
2009-08-17 16:50:35 +02:00
Tobias Doerffel
27f5d20e05 ControllerConnectionDialog: improved auto detect feature for controllers
When opening up the ControllerConnectionDialog by default auto detect
is enabled and all MIDI input devices are selected. Upon the first
event all devices but the one the event came from get unchecked. This
eases the process of assigning MIDI controls to software controls.
2009-08-14 15:12:58 +02:00
Tobias Doerffel
5ec96a9483 MidiEvent: allow querying name of port which it came from
Added functionality to query the name of the source port of a MidiEvent
by calling MidiClient::sourcePortName( const MidiEvent & ).
2009-08-14 15:12:57 +02:00
Tobias Doerffel
2475cf982b RemotePlugin: added missing include + coding style fixes
The header cstdlib is required for NULL pointer definition. Additionally
some minor coding style fixes.
2009-08-14 15:12:57 +02:00
Tobias Doerffel
40c56de898 MidiWinMM: fixed typo that caused writablePorts() not being overloaded
The MidiClient::writablePorts() method was not overloaded properly in
MidiWinMM implementation due to a typo. This should fix list of output
devices being empty on win32.
2009-08-14 15:12:57 +02:00
Tobias Doerffel
55337ad2be Renamed MIDI and audio related classes/files to match new style
Renamed all MIDI and audio related classes/files to match new style.
Additionally various cleanups.
(cherry picked from commit b8ebfbd06a)
2009-08-13 01:46:49 +02:00
Andrew Kelley
fb733051bd added FLAC as an export format 2009-08-12 07:18:16 -07:00
Andrew Kelley
6cf2d83808 made CLI rendering smoother
Suppressed a message box that would pop up in command
line interface causing a crash and made lmms act properly
when a rendering plugin fails. Need to figure out how to
terminate program in project_renderer line 222.
2009-08-12 07:14:44 -07:00
Andrew Kelley
1c118f1a46 sample_buffer: made MP3 decoder more robust
The mp3 decoder was using an uncomfortably large buffer,
laughably because of a negative overflow. Fixed this and
added a failsafe check to prevent buffer overflows.

Additionally changed printfs to qWarnings and fixed copyright
notice in audio_file_mp3.
2009-08-12 04:34:24 -07:00
Paul Giblock
f1d60958f0 Rename all Controller-family classes to new style
Adjust capitialization on all Controller-related classes to new
standards and update all calling code
2009-08-08 13:05:22 -04:00
Paul Giblock
bb76ba5121 Make Controller-Rack resizable
Per request, make the Controller-rack vertically sizable.  This is also
part of our effort to slowly deprecate old fixed-positioning code in
favor of layouts.
2009-08-07 16:26:07 -04:00
Tobias Doerffel
6e3e1513c7 Panning: fixed wrong type-conversion in panningToMidi()
Casting to panning_t in calculation in panningToMidi() leads to
integer overflows and thus to miscalculations. This resulted for
example in wrong panning during note preview when editing panning
of a note in PianoRoll. Casting to int instead fixes the issue.
2009-08-05 12:28:13 +02:00
Tobias Doerffel
0bb54199b0 Whole code base: various cleanups, removed SINGLE_SOURCE_COMPILE relicts
* cleaned up code and improved coding style
* removed old SINGLE_SOURCE_COMPILE macro relicts
* use QString::toUtf8() instead of QString::toAscii() wherever possible
2009-08-05 11:41:59 +02:00
Tobias Doerffel
89fa5c99e9 CPU: new framework for optimized CPU-specific routines
The new CPU framework replaces the old BasicOps framework. It is more
flexible and the build process isn't such a mess anymore (pre-compiled
assembler files etc.). It will hopefully see some improvements and
extensions soon.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-08-03 17:14:16 +02:00
Tobias Doerffel
f3e13c4427 RemotePlugin: added QSTR_TO_STDSTR macro and use it in LVSL/ZASF
QString::toStdString() is not aware of locale specific characters (it
just converts to ASCII). Therefore added new macro QSTR_TO_STDSTR which
converts a QString to std::string with UTF8 characters.

Use this new macro in LMMS VST Support Layer and ZynAddSubFX plugin.
This fixes for example VST plugins not being loaded when the path to
the DLL contains non-ASCII (e.g. cyrillic) characters.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-29 17:05:57 +02:00
Tobias Doerffel
ab0160f9fc LameLibrary: fixed copyright notice
Removed myself from list of copyright holders as I didn't help out
with LAME support at all.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-28 23:18:20 +02:00
Tobias Doerffel
e115124075 WebResourcesProvider: support for HTTP forwardings + cleanups
Properly handle HTTP status code 302 which indicates a moved site,
i.e. try to fetch data from the new location. This finally makes
WebResources work again with LSP being moved to http://lmms.info.

Furthermore cleaned up code a bit. There's no need for a global
QHttp object or a global QBuffer object. Instead allocate them on
the stack in the according methods.

Furthermore removed unused/incomplete support for non-blocking download.
We should introduce support for a ProgressDialog solution (also allowing
to cancel operations) later.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-17 11:49:51 +02:00
Andrew Kelley
e0e93a9730 Resource Browser - smoother gui
When you press down or up while browsing in the resource browser,
it plays the sample.
FIXED: When you click on the keyboard in the resource browser, and then
click on the treeview, it didn't transfer focus.
2009-07-16 08:14:17 -07:00
Andrew Kelley
73fdfb4ef1 exportPorjectDialog - default output file format
exportProjectDialog - select the output file format based on
what the user has already chosen in the export dialog. Prevents
the user from having to choose twice.
(also fixed whitespace and added modelines where applicable)
2009-07-16 05:19:26 -07:00
Andrew Kelley
2aae228af4 Refactor supportedFileExts from AudioFileProcessor
Refactor supported file extensions from AudioFileProcessor to
sampleBuffer, where the magic really happens. Change the hard-
coded MessageBox explaining supported formats to the real deal.
Also added modelines and switched spaces to tabs in the files
affected.
2009-07-16 04:34:11 -07:00
Andrew Kelley
c7205351c2 convert soft tabs to hard tabs and add a modeline 2009-07-16 03:30:31 -07:00
Andrew Kelley
a9a8e1c3a5 sampleBuffer::decodeSampleMp3 implemented
AudioFileProcessor can now open MP3 samples.
2009-07-15 14:43:56 -07:00
Andrew Kelley
2741eb217a LameLibrary - separated lame functionality
LameLibrary can now be easily used to access lame functionality.
This way we can use the same lame structure for SampleBuffer
2009-07-15 10:20:38 -07:00
Andrew Kelley
60a0bf9346 AudioFileMp3 - Use a configurable setting for lame
There is a new folder setting called Lame Library. AudioFileMp3
will look here for libmp3lame.so.0. If it can't find it it will
notify the user how to make it work and abort rendering gracefully.
2009-07-15 07:00:52 -07:00
Andrew Kelley
e53ea570b0 AudioFileMp3: provide support for mp3 export
Add MP3 as one of the options to export the project as. Currently
the lib path is hard-coded, need to add that to settings. It loads
lame dynamically.
2009-07-15 04:56:41 -07:00
Tobias Doerffel
a626763671 MainWindow: explicitely destroy ResourceBrowser instance
Explicitely destroy instance of ResourceBrowser in destructor of
MainWindow. This fixes crash at exit due to auto-deletion mechanisms
after the whole engine already has been shutdown.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-10 18:09:42 +02:00
Tobias Doerffel
cb72bf2260 MidiTime/Pattern: fixed divisions by zero with time sigs 1/16+
Setting time signatures 1/16+ lead to divisions by zero in two places.
Fixed this by adding according qMax() call (closes #2818125).

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-10 17:47:37 +02:00
Tobias Doerffel
4f249400ac MidiPort: added realOutputChannel() returning zero-based MIDI channel
MidiPort::outputChannelModel is ranged from 1 to 16 for displaying
user-friendly values. However internally MIDI channels are ranged from
0 to 15. Therefore added realOutputChannel() which returns zero-based
MIDI channel which should be used everywhere except for the GUI.

Fixes MIDI events being sent to VST plugins on channel 2 instead of
channel 1. Makes some more VST plugins actually usable.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-09 12:10:33 +02:00
Tobias Doerffel
2ef5dffec0 RemotePlugin: refactored system feature configuration
Variuos features (native/Qt semaphores/shared memory) are now
configured by macros like USE_QT_SHMEM and USE_QT_SEMAPHORES. This
allows central and individual configuration of features according to
the platform to build for at the beginning of the file.

Finally makes RemotePlugin work on OS X by not using native semaphores
rather than QSystemSemaphore's.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
2009-07-07 01:46:14 +02:00