replaced Q3ListBox with QListWidget and made layouting-stuff ofplugin-description-widget working properly
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@565 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
||||
2007-09-16 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* plugins/ladspa_effect/ladspa_subplugin_features.cpp:
|
||||
* include/effect_select_dialog.h:
|
||||
* src/core/effect_select_dialog.cpp:
|
||||
replaced Q3ListBox with QListWidget and made layouting-stuff of
|
||||
plugin-description-widget working properly
|
||||
|
||||
* data/locale/de.ts:
|
||||
fixed some strings in German localization
|
||||
|
||||
2007-09-03 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* plugins/patman/patman.cpp:
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
AC_INIT(lmms, 0.4.0-svn20070903, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20070903)
|
||||
AC_INIT(lmms, 0.4.0-svn20070916, lmms-devel/at/lists/dot/sf/dot/net)
|
||||
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20070916)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
|
||||
1128
data/locale/de.ts
1128
data/locale/de.ts
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@
|
||||
#define _EFFECT_SELECT_DIALOG_H
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
#include <Qt3Support/Q3ListBox>
|
||||
#include <QtGui/QListWidget>
|
||||
|
||||
#include "effect.h"
|
||||
|
||||
@@ -78,9 +78,9 @@ protected:
|
||||
|
||||
|
||||
protected slots:
|
||||
void onHighlighted( int _plugin );
|
||||
void rowChanged( int _plugin );
|
||||
void onAddButtonReleased();
|
||||
void onDoubleClicked( Q3ListBoxItem * _item );
|
||||
void onDoubleClicked( QListWidgetItem * _item );
|
||||
|
||||
|
||||
private:
|
||||
@@ -88,7 +88,8 @@ private:
|
||||
effectKeyList m_effectKeys;
|
||||
effectKey m_currentSelection;
|
||||
|
||||
Q3ListBox * m_pluginList;
|
||||
QListWidget * m_pluginList;
|
||||
QScrollArea * m_scrollArea;
|
||||
QWidget * m_descriptionWidget;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -66,9 +66,10 @@ void ladspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
QLabel * maker_content = new QLabel( maker );
|
||||
maker_content->setText( lm->getMaker( lkey ) );
|
||||
maker_content->setWordWrap( TRUE );
|
||||
l->addWidget( maker_label );
|
||||
l->addWidget( maker_content );
|
||||
l->setStretchFactor( maker_content, 100 );
|
||||
|
||||
|
||||
QWidget * copyright = new QWidget( _parent );
|
||||
l = new QHBoxLayout( copyright );
|
||||
l->setMargin( 0 );
|
||||
@@ -82,6 +83,8 @@ void ladspaSubPluginFeatures::fillDescriptionWidget( QWidget * _parent,
|
||||
QLabel * copyright_content = new QLabel( copyright );
|
||||
copyright_content->setText( lm->getCopyright( lkey ) );
|
||||
copyright_content->setWordWrap( TRUE );
|
||||
l->addWidget( copyright_label );
|
||||
l->addWidget( copyright_content );
|
||||
l->setStretchFactor( copyright_content, 100 );
|
||||
|
||||
QLabel * requiresRealTime = new QLabel( _parent );
|
||||
|
||||
@@ -149,7 +149,8 @@ void effectSelectDialog::selectPlugin( void )
|
||||
|
||||
|
||||
effectList::effectList( QWidget * _parent ) :
|
||||
QWidget( _parent )
|
||||
QWidget( _parent ),
|
||||
m_descriptionWidget( NULL )
|
||||
{
|
||||
plugin::getDescriptorsOfAvailPlugins( m_pluginDescriptors );
|
||||
|
||||
@@ -190,26 +191,24 @@ effectList::effectList( QWidget * _parent ) :
|
||||
"" );
|
||||
}
|
||||
|
||||
m_pluginList = new Q3ListBox( this );
|
||||
m_pluginList->insertStringList( plugin_names );
|
||||
connect( m_pluginList, SIGNAL( highlighted( int ) ),
|
||||
SLOT( onHighlighted( int ) ) );
|
||||
connect( m_pluginList, SIGNAL( doubleClicked( Q3ListBoxItem * ) ),
|
||||
SLOT( onDoubleClicked( Q3ListBoxItem * ) ) );
|
||||
m_pluginList = new QListWidget( this );
|
||||
m_pluginList->insertItems( 0, plugin_names );
|
||||
connect( m_pluginList, SIGNAL( currentRowChanged( int ) ),
|
||||
SLOT( rowChanged( int ) ) );
|
||||
connect( m_pluginList, SIGNAL( itemDoubleClicked( QListWidgetItem * ) ),
|
||||
SLOT( onDoubleClicked( QListWidgetItem * ) ) );
|
||||
|
||||
QGroupBox * groupbox = new QGroupBox( tr( "Description" ), this );
|
||||
groupbox->setFixedHeight( 200 );
|
||||
|
||||
QScrollArea * scrollArea = new QScrollArea( groupbox );
|
||||
scrollArea->setFrameStyle( 0 );
|
||||
m_descriptionWidget = new QWidget;
|
||||
QVBoxLayout * l = new QVBoxLayout( m_descriptionWidget );
|
||||
l->setMargin( 0 );
|
||||
l->setSpacing( 0 );
|
||||
QVBoxLayout * gbl = new QVBoxLayout( groupbox );
|
||||
gbl->setMargin( 0 );
|
||||
gbl->setSpacing( 10 );
|
||||
|
||||
scrollArea->setWidget( m_descriptionWidget );
|
||||
m_descriptionWidget->show();
|
||||
m_descriptionWidget->setFixedSize( 200, 200 );
|
||||
m_scrollArea = new QScrollArea( groupbox );
|
||||
m_scrollArea->setFrameStyle( 0 );
|
||||
|
||||
gbl->addWidget( m_scrollArea );
|
||||
|
||||
QVBoxLayout * vboxl = new QVBoxLayout( this );
|
||||
vboxl->setMargin( 0 );
|
||||
@@ -217,10 +216,10 @@ effectList::effectList( QWidget * _parent ) :
|
||||
vboxl->addWidget( m_pluginList );
|
||||
vboxl->addWidget( groupbox );
|
||||
|
||||
if( m_pluginList->numRows() > 0 )
|
||||
if( m_pluginList->count() > 0 )
|
||||
{
|
||||
m_pluginList->setSelected( 0, true );
|
||||
onHighlighted( 0 );
|
||||
m_pluginList->setCurrentRow( 0 );
|
||||
rowChanged( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,22 +233,33 @@ effectList::~effectList()
|
||||
|
||||
|
||||
|
||||
void effectList::onHighlighted( int _pluginIndex )
|
||||
void effectList::rowChanged( int _pluginIndex )
|
||||
{
|
||||
QLayoutItem * i;
|
||||
while( ( i = m_descriptionWidget->layout() ) != 0 )
|
||||
{
|
||||
delete i;
|
||||
}
|
||||
m_descriptionWidget->hide();
|
||||
delete m_descriptionWidget;
|
||||
m_descriptionWidget = NULL;
|
||||
|
||||
m_currentSelection = m_effectKeys[_pluginIndex];
|
||||
if( m_currentSelection.desc &&
|
||||
m_currentSelection.desc->sub_plugin_features )
|
||||
{
|
||||
m_descriptionWidget = new QWidget;
|
||||
QVBoxLayout * l = new QVBoxLayout( m_descriptionWidget );
|
||||
l->setMargin( 4 );
|
||||
l->setSpacing( 0 );
|
||||
|
||||
m_scrollArea->setWidget( m_descriptionWidget );
|
||||
|
||||
m_currentSelection.desc->sub_plugin_features->
|
||||
fillDescriptionWidget( m_descriptionWidget,
|
||||
&m_currentSelection );
|
||||
foreach( QWidget * w, m_descriptionWidget->findChildren<QWidget *>() )
|
||||
{
|
||||
if( w->parent() == m_descriptionWidget )
|
||||
{
|
||||
l->addWidget( w );
|
||||
}
|
||||
}
|
||||
l->setSizeConstraint( QLayout::SetFixedSize );
|
||||
m_descriptionWidget->show();
|
||||
}
|
||||
emit( highlighted( m_currentSelection ) );
|
||||
@@ -258,7 +268,7 @@ void effectList::onHighlighted( int _pluginIndex )
|
||||
|
||||
|
||||
|
||||
void effectList::onDoubleClicked( Q3ListBoxItem * _item )
|
||||
void effectList::onDoubleClicked( QListWidgetItem * _item )
|
||||
{
|
||||
emit( doubleClicked( m_currentSelection ) );
|
||||
}
|
||||
@@ -276,7 +286,7 @@ void effectList::onAddButtonReleased()
|
||||
|
||||
void effectList::resizeEvent( QResizeEvent * )
|
||||
{
|
||||
m_descriptionWidget->setFixedWidth( width() - 40 );
|
||||
//m_descriptionWidget->setFixedWidth( width() - 40 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user