mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-13 09:16:34 -04:00
DrumSynth relicense, MDI fixes, QPushButton inheritance, LiveTool fixes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@604 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
68
ChangeLog
68
ChangeLog
@@ -1,3 +1,71 @@
|
||||
2007-11-20 Javier Serrano Polo <jasp00/at/terra/dot/es>
|
||||
|
||||
* include/drumsynth.h:
|
||||
* licenses/drumsynth.LICENSE:
|
||||
* src/lib/drumsynth.cpp:
|
||||
relicensed under GPL, thanks to Paul Kellett.
|
||||
|
||||
* src/lib/sample_buffer.cpp:
|
||||
fixed Vorbis loading
|
||||
|
||||
* include/effect_label.h:
|
||||
* plugins/live_tool/live_tool.cpp:
|
||||
* src/core/automation_editor.cpp:
|
||||
* src/core/bb_editor.cpp:
|
||||
* src/core/effect_tab_widget.cpp:
|
||||
* src/core/main_window.cpp:
|
||||
* src/core/song_editor.cpp:
|
||||
* src/core/tool.cpp:
|
||||
* src/widgets/effect_label.cpp:
|
||||
* src/widgets/project_notes.cpp:
|
||||
fixed MDI windows
|
||||
|
||||
* include/main_window.h:
|
||||
* src/core/automation_editor.cpp:
|
||||
* src/core/main_window.cpp:
|
||||
* src/core/piano_roll.cpp:
|
||||
* src/core/song_editor.cpp:
|
||||
fixed non-MDI mode
|
||||
|
||||
* include/automatable_button.h:
|
||||
* src/widgets/automatable_button.cpp:
|
||||
inherit from QPushButton
|
||||
|
||||
* include/tool.h:
|
||||
* plugins/live_tool/live_tool.cpp:
|
||||
* plugins/live_tool/live_tool.h:
|
||||
* src/core/main_window.cpp:
|
||||
* src/core/tool.cpp:
|
||||
simplified tool interface
|
||||
|
||||
* plugins/live_tool/live_tool.cpp:
|
||||
fixed instrument toggling
|
||||
|
||||
* plugins/live_tool/live_tool.cpp:
|
||||
* plugins/live_tool/live_tool.h:
|
||||
fixed focus bug
|
||||
|
||||
* include/effect_label.h:
|
||||
* src/widgets/effect_label.cpp:
|
||||
simplified window management
|
||||
|
||||
* include/effect_label.h:
|
||||
* include/main_window.h:
|
||||
* plugins/vst_base/lvsl_client.cpp:
|
||||
* plugins/vst_effect/vst_effect.h:
|
||||
* src/core/track_container.cpp:
|
||||
reduced dependencies
|
||||
|
||||
* data/samples/drumsynth/misc_bass/Makefile.am:
|
||||
* data/samples/drumsynth/misc_claps/Makefile.am:
|
||||
* data/samples/drumsynth/misc_electro/Makefile.am:
|
||||
* data/samples/drumsynth/misc_fx/Makefile.am:
|
||||
* data/samples/drumsynth/misc_hats/Makefile.am:
|
||||
* data/samples/drumsynth/misc_perc/Makefile.am:
|
||||
* data/samples/drumsynth/misc_synth/Makefile.am:
|
||||
* data/samples/drumsynth/r_b/Makefile.am:
|
||||
replaced more filenames with underscores, thanks to Vik.
|
||||
|
||||
2007-11-20 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
|
||||
* src/core/main_window:
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(lmms, 0.4.0-svn20071114, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20071114)
|
||||
AC_INIT(lmms, 0.4.0-svn20071120, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20071120)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
miscbassdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc bass
|
||||
miscbassdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc_bass
|
||||
|
||||
miscbassdrumsynthsamples_DATA = *.ds
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
miscclapsdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc claps
|
||||
miscclapsdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc_claps
|
||||
|
||||
miscclapsdrumsynthsamples_DATA = *.ds
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
miscelectrodrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc electro
|
||||
miscelectrodrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc_electro
|
||||
|
||||
miscelectrodrumsynthsamples_DATA = *.ds
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
miscfxdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc fx
|
||||
miscfxdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc_fx
|
||||
|
||||
miscfxdrumsynthsamples_DATA = *.ds
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
mischatsdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc hats
|
||||
mischatsdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc_hats
|
||||
|
||||
mischatsdrumsynthsamples_DATA = *.ds
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
miscpercdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc perc
|
||||
miscpercdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc_perc
|
||||
|
||||
miscpercdrumsynthsamples_DATA = *.ds
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
miscsynthdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc synth
|
||||
miscsynthdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/misc_synth
|
||||
|
||||
miscsynthdrumsynthsamples_DATA = *.ds
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
rbdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/r&b
|
||||
rbdrumsynthsamplesdir = $(lmmsdatadir)/samples/drumsynth/r_b
|
||||
|
||||
rbdrumsynthsamples_DATA = *.ds
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifndef _AUTOMATABLE_BUTTON_H
|
||||
#define _AUTOMATABLE_BUTTON_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPushButton>
|
||||
|
||||
#include "automatable_object.h"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
class automatableButtonGroup;
|
||||
|
||||
|
||||
class automatableButton : public QWidget, public automatableObject<bool,
|
||||
class automatableButton : public QPushButton, public automatableObject<bool,
|
||||
signed char>
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -44,22 +44,12 @@ public:
|
||||
virtual ~automatableButton();
|
||||
|
||||
|
||||
inline virtual bool isChecked( void ) const
|
||||
{
|
||||
return( value() );
|
||||
}
|
||||
|
||||
virtual void setValue( const bool _on );
|
||||
|
||||
inline void setCheckable( bool _on )
|
||||
{
|
||||
m_checkable = _on;
|
||||
setJournalling( m_checkable );
|
||||
}
|
||||
|
||||
inline bool isCheckable( void ) const
|
||||
{
|
||||
return( m_checkable );
|
||||
QPushButton::setCheckable( _on );
|
||||
setJournalling( _on );
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +57,7 @@ public slots:
|
||||
virtual void toggle( void );
|
||||
virtual void setChecked( bool _on )
|
||||
{
|
||||
// QPushButton::setChecked is called in setValue()
|
||||
setValue( _on );
|
||||
}
|
||||
|
||||
@@ -79,16 +70,10 @@ protected:
|
||||
|
||||
private:
|
||||
automatableButtonGroup * m_group;
|
||||
bool m_checkable;
|
||||
|
||||
|
||||
friend class automatableButtonGroup;
|
||||
|
||||
|
||||
signals:
|
||||
void clicked( void );
|
||||
void toggled( bool );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -1,30 +1,28 @@
|
||||
// DrumSynth DS file renderer
|
||||
// Copyright (c)1998-2000 Paul Kellett (mda-vst.com)
|
||||
// Licensed under the MIT License. Read drumsynth.LICENSE for details
|
||||
// Version 2.0 (5/10/00)
|
||||
//
|
||||
// Adapted for LMMS 2007 Paul Giblock
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the "Software"), to deal in the Software without
|
||||
// restriction, including without limitation the rights to use,
|
||||
// copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the
|
||||
// Software is furnished to do so, subject to the following
|
||||
// conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
/*
|
||||
* drumsynth.h - DrumSynth DS file renderer
|
||||
*
|
||||
* Copyright (c) 1998-2000 Paul Kellett (mda-vst.com)
|
||||
* Copyright (c) 2007 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* 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 (at your option) 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _DRUMSYNTH_H__
|
||||
#define _DRUMSYNTH_H__
|
||||
|
||||
@@ -27,12 +27,13 @@
|
||||
#define _EFFECT_LABEL_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
#include "journalling_object.h"
|
||||
|
||||
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
|
||||
class effectTabWidget;
|
||||
class sampleTrack;
|
||||
class tabWidget;
|
||||
@@ -56,11 +57,12 @@ public:
|
||||
{
|
||||
return( "sample_track" );
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
void showEffects( void );
|
||||
void closeEffects( void );
|
||||
void rename( void );
|
||||
|
||||
|
||||
signals:
|
||||
void clicked( void );
|
||||
@@ -68,18 +70,21 @@ signals:
|
||||
void nameChanged( const QString & _new_name );
|
||||
void pixmapChanged( void );
|
||||
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
virtual void mouseDoubleClickEvent( QMouseEvent * _me );
|
||||
|
||||
|
||||
private:
|
||||
sampleTrack * m_track;
|
||||
bool m_show;
|
||||
|
||||
QLabel * m_label;
|
||||
QPushButton * m_effectBtn;
|
||||
tabWidget * m_tabWidget;
|
||||
effectTabWidget * m_effWidget;
|
||||
QWidget * m_effWindow;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
#define _EFFECT_TAB_WIDGET_H
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QLayout>
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "rack_view.h"
|
||||
|
||||
|
||||
class QPushButton;
|
||||
|
||||
class audioPort;
|
||||
class groupBox;
|
||||
class instrumentTrack;
|
||||
@@ -68,19 +68,11 @@ public:
|
||||
}
|
||||
|
||||
|
||||
signals:
|
||||
void closed( void );
|
||||
|
||||
|
||||
private slots:
|
||||
void addEffect( void );
|
||||
void setBypass( bool _state );
|
||||
|
||||
|
||||
protected:
|
||||
virtual void closeEvent( QCloseEvent * _ce );
|
||||
|
||||
|
||||
private:
|
||||
track * m_track;
|
||||
audioPort * m_port;
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QWhatsThis>
|
||||
|
||||
class QAction;
|
||||
class QDomElement;
|
||||
class QGridLayout;
|
||||
class QMdiArea;
|
||||
class QSplashScreen;
|
||||
|
||||
class configManager;
|
||||
@@ -123,6 +123,8 @@ private:
|
||||
|
||||
void finalize( void );
|
||||
|
||||
void toggleWindow( QWidget * _w );
|
||||
|
||||
|
||||
QMdiArea * m_workspace;
|
||||
|
||||
|
||||
@@ -31,19 +31,15 @@
|
||||
#include "plugin.h"
|
||||
|
||||
|
||||
class mainWindow;
|
||||
|
||||
|
||||
class tool : public QWidget, public plugin
|
||||
{
|
||||
public:
|
||||
tool( mainWindow * _window, const descriptor * _descriptor );
|
||||
tool( const descriptor * _descriptor );
|
||||
virtual ~tool();
|
||||
|
||||
// instantiate tool-plugin with given name or return NULL
|
||||
// on failure
|
||||
static tool * FASTCALL instantiate( const QString & _plugin_name,
|
||||
mainWindow * _window );
|
||||
static tool * FASTCALL instantiate( const QString & _plugin_name );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
DrumSynth Original License (MIT):
|
||||
----------------------------------------------------------------
|
||||
|
||||
Copyright (c) 1998-2000 Paul Kellett (mda-vst.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -23,9 +23,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <QtGui/QKeyEvent>
|
||||
|
||||
#include "live_tool.h"
|
||||
|
||||
#include <QtGui/QKeyEvent>
|
||||
#include <QtGui/QLayout>
|
||||
|
||||
#include "bb_editor.h"
|
||||
#include "engine.h"
|
||||
#include "song_editor.h"
|
||||
@@ -63,8 +65,8 @@ plugin::descriptor live_tool_plugin_descriptor =
|
||||
|
||||
|
||||
|
||||
liveTool::liveTool( mainWindow * _window ) :
|
||||
tool( _window, &live_tool_plugin_descriptor )
|
||||
liveTool::liveTool( void ) :
|
||||
tool( &live_tool_plugin_descriptor )
|
||||
{
|
||||
const QPixmap background = PLUGIN_NAME::getIconPixmap( "artwork" );
|
||||
|
||||
@@ -83,6 +85,12 @@ liveTool::liveTool( mainWindow * _window ) :
|
||||
"Beat+Baseline Editor." ) );
|
||||
|
||||
hide();
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
parentWidget()->layout()->setSizeConstraint(
|
||||
QLayout::SetFixedSize );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +141,16 @@ void liveTool::keyPressEvent( QKeyEvent * _ke )
|
||||
|
||||
|
||||
|
||||
void liveTool::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
// MDI window gets focus otherwise
|
||||
setFocus();
|
||||
_me->accept();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
bool liveTool::x11Event( XEvent * _xe )
|
||||
{
|
||||
@@ -155,7 +173,7 @@ bool liveTool::x11Event( XEvent * _xe )
|
||||
|
||||
void liveTool::toggleInstrument( int _n )
|
||||
{
|
||||
if( _n > 0 && _n < engine::getBBEditor()->tracks().count() )
|
||||
if( _n < engine::getBBEditor()->tracks().count() )
|
||||
{
|
||||
track * t = engine::getBBEditor()->tracks().at( _n );
|
||||
t->setMuted( !t->muted() );
|
||||
@@ -171,7 +189,7 @@ extern "C"
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * lmms_plugin_main( void * _data )
|
||||
{
|
||||
return( new liveTool( static_cast<mainWindow *>( _data ) ) );
|
||||
return( new liveTool() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* live_tool.h - declaration of class liveTool, for live performance
|
||||
*
|
||||
* Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
* Copyright (c) 2006-2007 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -35,7 +35,7 @@
|
||||
class liveTool : public tool
|
||||
{
|
||||
public:
|
||||
liveTool( mainWindow * _window );
|
||||
liveTool( void );
|
||||
virtual ~liveTool();
|
||||
|
||||
virtual QString nodeName( void ) const;
|
||||
@@ -43,6 +43,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent( QKeyEvent * _ke );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
#ifdef Q_WS_X11
|
||||
virtual bool x11Event( XEvent * _xe );
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <QtCore/QLocale>
|
||||
#include <QtCore/QTime>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QX11EmbedContainer>
|
||||
#include <QtGui/QX11Info>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#define _VST_EFFECT_H
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
#include "effect.h"
|
||||
#include "engine.h"
|
||||
|
||||
@@ -74,7 +74,6 @@ QPixmap * automationEditor::s_toolMove = NULL;
|
||||
|
||||
|
||||
automationEditor::automationEditor( void ) :
|
||||
QWidget( ),
|
||||
m_pattern( NULL ),
|
||||
m_min_level( 0 ),
|
||||
m_max_level( 0 ),
|
||||
@@ -335,11 +334,14 @@ automationEditor::automationEditor( void ) :
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->resize( INITIAL_WIDTH, INITIAL_HEIGHT );
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
resize( INITIAL_WIDTH, INITIAL_HEIGHT );
|
||||
hide();
|
||||
}
|
||||
|
||||
parentWidget()->resize( INITIAL_WIDTH, INITIAL_HEIGHT );
|
||||
parentWidget()->hide();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -766,8 +768,15 @@ void automationEditor::removeSelection( void )
|
||||
void automationEditor::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
hide();
|
||||
_ce->ignore ();
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -300,8 +300,15 @@ void bbEditor::updateComboBox( void )
|
||||
// instead of closing it's being hidden
|
||||
void bbEditor::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,22 +26,22 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include "effect_tab_widget.h"
|
||||
|
||||
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QToolButton>
|
||||
#include <QtGui/QCloseEvent>
|
||||
|
||||
|
||||
#include "effect_tab_widget.h"
|
||||
#include "instrument_track.h"
|
||||
#include "sample_track.h"
|
||||
#include "group_box.h"
|
||||
#include "tooltip.h"
|
||||
#include "embed.h"
|
||||
#include "audio_port.h"
|
||||
#include "effect_select_dialog.h"
|
||||
#include "embed.h"
|
||||
#include "group_box.h"
|
||||
#include "instrument_track.h"
|
||||
#include "rack_plugin.h"
|
||||
#include "rack_view.h"
|
||||
#include "audio_port.h"
|
||||
#include "sample_track.h"
|
||||
#include "tooltip.h"
|
||||
|
||||
|
||||
|
||||
@@ -155,13 +155,6 @@ void effectTabWidget::setBypass( bool _state )
|
||||
|
||||
|
||||
|
||||
void effectTabWidget::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
_ce->ignore();
|
||||
emit( closed() );
|
||||
}
|
||||
|
||||
|
||||
#include "effect_tab_widget.moc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -73,7 +73,6 @@ extern int splash_alignment_flags;
|
||||
|
||||
|
||||
mainWindow::mainWindow( void ) :
|
||||
QMainWindow(),
|
||||
m_workspace( NULL ),
|
||||
m_templatesMenu( NULL ),
|
||||
m_recentlyOpenedProjectsMenu( NULL ),
|
||||
@@ -177,6 +176,7 @@ mainWindow::mainWindow( void ) :
|
||||
|
||||
mainWindow::~mainWindow()
|
||||
{
|
||||
// TODO: Close tools
|
||||
// destroy engine which will do further cleanups etc.
|
||||
engine::destroy();
|
||||
}
|
||||
@@ -428,8 +428,7 @@ void mainWindow::finalize( void )
|
||||
if( it->type == plugin::Tool )
|
||||
{
|
||||
m_tools_menu->addAction( *it->logo, it->public_name );
|
||||
m_tools.push_back( tool::instantiate( it->name,
|
||||
this ) );
|
||||
m_tools.push_back( tool::instantiate( it->name ) );
|
||||
}
|
||||
}
|
||||
if( !m_tools_menu->isEmpty() )
|
||||
@@ -540,8 +539,8 @@ void mainWindow::clearKeyModifiers( void )
|
||||
|
||||
void mainWindow::saveWidgetState( QWidget * _w, QDomElement & _de )
|
||||
{
|
||||
if( _w->parentWidget() != NULL &&
|
||||
_w->parentWidget()->inherits("QMdiSubWindow"))
|
||||
if( _w->parentWidget() != NULL &&
|
||||
_w->parentWidget()->inherits( "QMdiSubWindow" ) )
|
||||
{
|
||||
_w = _w->parentWidget();
|
||||
}
|
||||
@@ -568,7 +567,7 @@ void mainWindow::restoreWidgetState( QWidget * _w, const QDomElement & _de )
|
||||
_w->show();
|
||||
|
||||
if (_w->parentWidget() != NULL &&
|
||||
_w->parentWidget()->inherits("QMdiSubWindow"))
|
||||
_w->parentWidget()->inherits( "QMdiSubWindow" ) )
|
||||
{
|
||||
_w = _w->parentWidget();
|
||||
}
|
||||
@@ -732,37 +731,50 @@ void mainWindow::help( void )
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleBBEditorWin( void )
|
||||
void mainWindow::toggleWindow( QWidget * _w )
|
||||
{
|
||||
if( engine::getBBEditor()->parentWidget()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL &&
|
||||
m_workspace->activeSubWindow()->widget() != engine::getBBEditor() ) )
|
||||
if( m_workspace )
|
||||
{
|
||||
engine::getBBEditor()->parentWidget()->show();
|
||||
engine::getBBEditor()->setFocus();
|
||||
if( m_workspace->activeSubWindow() != _w->parentWidget()
|
||||
|| _w->parentWidget()->isHidden() )
|
||||
{
|
||||
_w->parentWidget()->show();
|
||||
_w->show();
|
||||
_w->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
_w->parentWidget()->hide();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getBBEditor()->parentWidget()->hide();
|
||||
if( _w->isHidden() )
|
||||
{
|
||||
_w->show();
|
||||
_w->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
_w->hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleBBEditorWin( void )
|
||||
{
|
||||
toggleWindow( engine::getBBEditor() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void mainWindow::toggleSongEditorWin( void )
|
||||
{
|
||||
if( engine::getSongEditor()->parentWidget()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeSubWindow()->widget()
|
||||
!= engine::getSongEditor() ) )
|
||||
{
|
||||
engine::getSongEditor()->parentWidget()->show();
|
||||
engine::getSongEditor()->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getSongEditor()->parentWidget()->hide();
|
||||
}
|
||||
toggleWindow( engine::getSongEditor() );
|
||||
}
|
||||
|
||||
|
||||
@@ -770,17 +782,7 @@ void mainWindow::toggleSongEditorWin( void )
|
||||
|
||||
void mainWindow::toggleProjectNotesWin( void )
|
||||
{
|
||||
if( engine::getProjectNotes()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeSubWindow()->widget() !=
|
||||
engine::getProjectNotes() ) )
|
||||
{
|
||||
engine::getProjectNotes()->show();
|
||||
engine::getProjectNotes()->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getProjectNotes()->hide();
|
||||
}
|
||||
toggleWindow( engine::getProjectNotes() );
|
||||
}
|
||||
|
||||
|
||||
@@ -788,17 +790,7 @@ void mainWindow::toggleProjectNotesWin( void )
|
||||
|
||||
void mainWindow::togglePianoRollWin( void )
|
||||
{
|
||||
if( engine::getPianoRoll()->parentWidget()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeSubWindow()->widget()
|
||||
!= engine::getPianoRoll() ) )
|
||||
{
|
||||
engine::getPianoRoll()->parentWidget()->show();
|
||||
engine::getPianoRoll()->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getPianoRoll()->parentWidget()->hide();
|
||||
}
|
||||
toggleWindow( engine::getPianoRoll() );
|
||||
}
|
||||
|
||||
|
||||
@@ -806,17 +798,7 @@ void mainWindow::togglePianoRollWin( void )
|
||||
|
||||
void mainWindow::toggleAutomationEditorWin( void )
|
||||
{
|
||||
if( engine::getAutomationEditor()->parentWidget()->isHidden() == TRUE ||
|
||||
( m_workspace != NULL && m_workspace->activeSubWindow()->widget()
|
||||
!= engine::getAutomationEditor() ) )
|
||||
{
|
||||
engine::getAutomationEditor()->parentWidget()->show();
|
||||
engine::getAutomationEditor()->setFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
engine::getAutomationEditor()->parentWidget()->hide();
|
||||
}
|
||||
toggleWindow( engine::getAutomationEditor() );
|
||||
}
|
||||
|
||||
|
||||
@@ -936,6 +918,10 @@ void mainWindow::showTool( QAction * _idx )
|
||||
{
|
||||
tool * t = m_tools[m_tools_menu->actions().indexOf( _idx )];
|
||||
t->show();
|
||||
if( m_workspace )
|
||||
{
|
||||
t->parentWidget()->show();
|
||||
}
|
||||
t->setFocus();
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,6 @@ const int DEFAULT_PR_PPT = KEY_LINE_HEIGHT * DEFAULT_STEPS_PER_TACT;
|
||||
|
||||
|
||||
pianoRoll::pianoRoll( void ) :
|
||||
QWidget( ),
|
||||
m_pattern( NULL ),
|
||||
m_currentPosition(),
|
||||
m_recording( FALSE ),
|
||||
@@ -421,14 +420,19 @@ pianoRoll::pianoRoll( void ) :
|
||||
|
||||
setMouseTracking( TRUE );
|
||||
|
||||
// add us to workspace
|
||||
// add us to workspace
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->resize( INITIAL_PIANOROLL_WIDTH,
|
||||
INITIAL_PIANOROLL_HEIGHT );
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
resize( INITIAL_PIANOROLL_WIDTH, INITIAL_PIANOROLL_HEIGHT );
|
||||
hide();
|
||||
}
|
||||
parentWidget()->resize( INITIAL_PIANOROLL_WIDTH, INITIAL_PIANOROLL_HEIGHT );
|
||||
parentWidget()->hide();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -970,8 +974,15 @@ void pianoRoll::removeSelection( void )
|
||||
void pianoRoll::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
parentWidget()->hide();
|
||||
_ce->ignore ();
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -413,8 +413,15 @@ songEditor::~songEditor()
|
||||
|
||||
void songEditor::closeEvent( QCloseEvent * _ce )
|
||||
{
|
||||
if( parentWidget() )
|
||||
{
|
||||
parentWidget()->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
hide();
|
||||
}
|
||||
_ce->ignore();
|
||||
hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,17 +30,29 @@
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtGui/QMdiArea>
|
||||
|
||||
#include "engine.h"
|
||||
#include "main_window.h"
|
||||
|
||||
|
||||
|
||||
|
||||
tool::tool( mainWindow * _window, const descriptor * _descriptor ) :
|
||||
QWidget( _window->workspace() ),
|
||||
tool::tool( const descriptor * _descriptor ) :
|
||||
plugin( _descriptor )
|
||||
{
|
||||
setWindowTitle( _descriptor->public_name );
|
||||
setWindowIcon( *_descriptor->logo );
|
||||
QWidget * window;
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
window = parentWidget();
|
||||
window->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
window = this;
|
||||
}
|
||||
|
||||
window->setWindowTitle( _descriptor->public_name );
|
||||
window->setWindowIcon( *_descriptor->logo );
|
||||
}
|
||||
|
||||
|
||||
@@ -53,9 +65,9 @@ tool::~tool()
|
||||
|
||||
|
||||
|
||||
tool * tool::instantiate( const QString & _plugin_name, mainWindow * _window )
|
||||
tool * tool::instantiate( const QString & _plugin_name )
|
||||
{
|
||||
plugin * p = plugin::instantiate( _plugin_name, _window );
|
||||
plugin * p = plugin::instantiate( _plugin_name, NULL );
|
||||
// check whether instantiated plugin is an instrument
|
||||
if( dynamic_cast<tool *>( p ) != NULL )
|
||||
{
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
|
||||
|
||||
trackContainer::trackContainer( void ) :
|
||||
QWidget( ),
|
||||
m_currentPosition( 0, 0 ),
|
||||
m_scrollArea( new scrollArea( this ) ),
|
||||
m_ppt( DEFAULT_PIXELS_PER_TACT ),
|
||||
|
||||
@@ -1,10 +1,28 @@
|
||||
// DrumSynth DS file renderer
|
||||
// Copyright (c)1998-2000 Paul Kellett (mda-vst.com)
|
||||
// Licensed under the MIT License. Read drumsynth.LICENSE for details
|
||||
// Version 2.0 (5/10/00)
|
||||
//
|
||||
// Adapted for LMMS 2007 Paul Giblock
|
||||
//
|
||||
/*
|
||||
* drumsynth.cpp - DrumSynth DS file renderer
|
||||
*
|
||||
* Copyright (c) 1998-2000 Paul Kellett (mda-vst.com)
|
||||
* Copyright (c) 2007 Paul Giblock <drfaygo/at/gmail.com>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
* 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 (at your option) 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "drumsynth.h"
|
||||
|
||||
|
||||
@@ -485,7 +485,7 @@ f_cnt_t sampleBuffer::decodeSampleOGGVorbis( const char * _f,
|
||||
f_cnt_t frames = 0;
|
||||
|
||||
QFile * f = new QFile( _f );
|
||||
if( f->open( QFile::ReadOnly | QFile::Truncate ) == FALSE )
|
||||
if( f->open( QFile::ReadOnly ) == FALSE )
|
||||
{
|
||||
delete f;
|
||||
return( 0 );
|
||||
|
||||
@@ -40,10 +40,9 @@
|
||||
|
||||
automatableButton::automatableButton( QWidget * _parent, const QString & _name,
|
||||
track * _track ) :
|
||||
QWidget( _parent ),
|
||||
QPushButton( _parent ),
|
||||
autoObj( _track, FALSE, FALSE, TRUE ),
|
||||
m_group( NULL ),
|
||||
m_checkable( FALSE )
|
||||
m_group( NULL )
|
||||
{
|
||||
if( _track != NULL )
|
||||
{
|
||||
@@ -71,7 +70,7 @@ void automatableButton::contextMenuEvent( QContextMenuEvent * _me )
|
||||
{
|
||||
if( nullTrack() && ( m_group == NULL || m_group->nullTrack() ) )
|
||||
{
|
||||
QWidget::contextMenuEvent( _me );
|
||||
QPushButton::contextMenuEvent( _me );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -109,11 +108,7 @@ void automatableButton::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton )
|
||||
{
|
||||
if( m_checkable == FALSE )
|
||||
{
|
||||
setChecked( TRUE );
|
||||
}
|
||||
else
|
||||
if( isCheckable() )
|
||||
{
|
||||
toggle();
|
||||
}
|
||||
@@ -121,7 +116,7 @@ void automatableButton::mousePressEvent( QMouseEvent * _me )
|
||||
}
|
||||
else
|
||||
{
|
||||
QWidget::mousePressEvent( _me );
|
||||
QPushButton::mousePressEvent( _me );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,10 +125,6 @@ void automatableButton::mousePressEvent( QMouseEvent * _me )
|
||||
|
||||
void automatableButton::mouseReleaseEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( m_checkable == FALSE )
|
||||
{
|
||||
setChecked( FALSE );
|
||||
}
|
||||
emit clicked();
|
||||
}
|
||||
|
||||
@@ -142,7 +133,7 @@ void automatableButton::mouseReleaseEvent( QMouseEvent * _me )
|
||||
|
||||
void automatableButton::toggle( void )
|
||||
{
|
||||
if( m_checkable == TRUE && m_group != NULL )
|
||||
if( isCheckable() && m_group != NULL )
|
||||
{
|
||||
if( value() == FALSE )
|
||||
{
|
||||
@@ -165,6 +156,7 @@ void automatableButton::setValue( const bool _on )
|
||||
{
|
||||
autoObj::setValue( _on );
|
||||
setFirstValue();
|
||||
QPushButton::setChecked( _on );
|
||||
update();
|
||||
emit( toggled( value() ) );
|
||||
}
|
||||
|
||||
@@ -28,8 +28,10 @@
|
||||
|
||||
#include "effect_label.h"
|
||||
|
||||
#include <QtGui/QMouseEvent>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QMouseEvent>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#include "effect_tab_widget.h"
|
||||
@@ -46,8 +48,7 @@
|
||||
effectLabel::effectLabel( const QString & _initial_name, QWidget * _parent,
|
||||
sampleTrack * _track ) :
|
||||
QWidget( _parent ),
|
||||
m_track( _track ),
|
||||
m_show( TRUE )
|
||||
m_track( _track )
|
||||
{
|
||||
m_effectBtn = new QPushButton( embed::getIconPixmap( "setup_audio" ),
|
||||
"", this );
|
||||
@@ -67,14 +68,21 @@ effectLabel::effectLabel( const QString & _initial_name, QWidget * _parent,
|
||||
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( m_effWidget );
|
||||
engine::getMainWindow()->workspace()->addSubWindow(
|
||||
m_effWidget );
|
||||
m_effWindow = m_effWidget->parentWidget();
|
||||
m_effWindow->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
m_effWindow->layout()->setSizeConstraint(
|
||||
QLayout::SetFixedSize );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_effWindow = m_effWidget;
|
||||
}
|
||||
|
||||
m_effWidget->setWindowTitle( _initial_name );
|
||||
m_effWindow->setWindowTitle( _initial_name );
|
||||
m_effWidget->setFixedSize( 240, 242 );
|
||||
m_effWidget->hide();
|
||||
connect( m_effWidget, SIGNAL( closed() ),
|
||||
this, SLOT( closeEffects() ) );
|
||||
m_effWindow->hide();
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +90,7 @@ effectLabel::effectLabel( const QString & _initial_name, QWidget * _parent,
|
||||
|
||||
effectLabel::~effectLabel()
|
||||
{
|
||||
delete m_effWidget;
|
||||
m_effWindow->deleteLater();
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +107,7 @@ QString effectLabel::text( void ) const
|
||||
void FASTCALL effectLabel::setText( const QString & _text )
|
||||
{
|
||||
m_label->setText( _text );
|
||||
m_effWidget->setWindowTitle( _text );
|
||||
m_effWindow->setWindowTitle( _text );
|
||||
}
|
||||
|
||||
|
||||
@@ -107,16 +115,18 @@ void FASTCALL effectLabel::setText( const QString & _text )
|
||||
|
||||
void effectLabel::showEffects( void )
|
||||
{
|
||||
if( m_show )
|
||||
if( m_effWindow->isHidden() )
|
||||
{
|
||||
m_effWidget->show();
|
||||
m_effWidget->raise();
|
||||
m_show = FALSE;
|
||||
if( m_effWindow != m_effWidget )
|
||||
{
|
||||
m_effWindow->show();
|
||||
}
|
||||
m_effWindow->raise();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_effWidget->hide();
|
||||
m_show = TRUE;
|
||||
m_effWindow->hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,15 +164,6 @@ void effectLabel::loadSettings( const QDomElement & _this )
|
||||
|
||||
|
||||
|
||||
void effectLabel::closeEffects( void )
|
||||
{
|
||||
m_effWidget->hide();
|
||||
m_show = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void effectLabel::rename( void )
|
||||
{
|
||||
QString txt = text();
|
||||
|
||||
@@ -27,17 +27,18 @@
|
||||
|
||||
#include "project_notes.h"
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QAction>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QCloseEvent>
|
||||
#include <QtGui/QColorDialog>
|
||||
#include <QtGui/QComboBox>
|
||||
#include <QtGui/QFontDatabase>
|
||||
#include <QtGui/QLineEdit>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtGui/QTextCursor>
|
||||
#include <QtGui/QTextEdit>
|
||||
#include <QtGui/QToolBar>
|
||||
#include <QtGui/QMdiArea>
|
||||
#include <QtXml/QDomCDATASection>
|
||||
|
||||
#include "embed.h"
|
||||
#include "engine.h"
|
||||
@@ -71,23 +72,18 @@ projectNotes::projectNotes( void ) :
|
||||
setWindowTitle( tr( "Project notes" ) );
|
||||
setWindowIcon( embed::getIconPixmap( "project_notes" ) );
|
||||
|
||||
resize( 300, 200 );
|
||||
|
||||
if( engine::getMainWindow()->workspace() )
|
||||
{
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
}
|
||||
|
||||
QWidget * w = ( parentWidget() != NULL ) ? parentWidget() : this;
|
||||
if( engine::getMainWindow()->workspace() != NULL )
|
||||
{
|
||||
w->move( 700, 10 );
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
parentWidget()->move( 700, 10 );
|
||||
parentWidget()->resize( 300, 200 );
|
||||
}
|
||||
else
|
||||
{
|
||||
w->move( 800, 10 );
|
||||
move( 800, 10 );
|
||||
resize( 300, 200 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user