Byebye q3valuelist
svn path=/trunk/KDE/kdebase/workspace/; revision=461499
This commit is contained in:
parent
8d2e997ce3
commit
db7d074ad1
3 changed files with 15 additions and 17 deletions
|
@ -40,7 +40,7 @@
|
||||||
#include <QDragMoveEvent>
|
#include <QDragMoveEvent>
|
||||||
#include <Q3Frame>
|
#include <Q3Frame>
|
||||||
#include <QDropEvent>
|
#include <QDropEvent>
|
||||||
#include <Q3ValueList>
|
#include <QList>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
#include <QDragEnterEvent>
|
#include <QDragEnterEvent>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
@ -140,7 +140,7 @@ class ButtonSource : public KListView
|
||||||
virtual Q3DragObject *dragObject();
|
virtual Q3DragObject *dragObject();
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef Q3ValueList<ButtonDropSiteItem*> ButtonList;
|
typedef QList<ButtonDropSiteItem*> ButtonList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class renders and handles the demo titlebar dropsite
|
* This class renders and handles the demo titlebar dropsite
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
//Added by qt3to4:
|
//Added by qt3to4:
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <Q3ValueList>
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include <kapplication.h>
|
#include <kapplication.h>
|
||||||
|
@ -235,7 +234,7 @@ void KWinDecorationModule::findDecorations()
|
||||||
// Fills the decorationList with a list of available kwin decorations
|
// Fills the decorationList with a list of available kwin decorations
|
||||||
void KWinDecorationModule::createDecorationList()
|
void KWinDecorationModule::createDecorationList()
|
||||||
{
|
{
|
||||||
Q3ValueList<DecorationInfo>::ConstIterator it;
|
QList<DecorationInfo>::ConstIterator it;
|
||||||
|
|
||||||
// Sync with kwin hardcoded KDE2 style which has no desktop item
|
// Sync with kwin hardcoded KDE2 style which has no desktop item
|
||||||
QStringList decorationNames;
|
QStringList decorationNames;
|
||||||
|
@ -277,10 +276,10 @@ static const char* const border_names[ KDecorationDefines::BordersCount ] =
|
||||||
I18N_NOOP( "Oversized" )
|
I18N_NOOP( "Oversized" )
|
||||||
};
|
};
|
||||||
|
|
||||||
int KWinDecorationModule::borderSizeToIndex( BorderSize size, Q3ValueList< BorderSize > sizes )
|
int KWinDecorationModule::borderSizeToIndex( BorderSize size, QList< BorderSize > sizes )
|
||||||
{
|
{
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
for( Q3ValueList< BorderSize >::ConstIterator it = sizes.begin();
|
for( QList< BorderSize >::ConstIterator it = sizes.begin();
|
||||||
it != sizes.end();
|
it != sizes.end();
|
||||||
++it, ++pos )
|
++it, ++pos )
|
||||||
if( size <= *it )
|
if( size <= *it )
|
||||||
|
@ -289,9 +288,9 @@ int KWinDecorationModule::borderSizeToIndex( BorderSize size, Q3ValueList< Borde
|
||||||
}
|
}
|
||||||
|
|
||||||
KDecorationDefines::BorderSize KWinDecorationModule::indexToBorderSize( int index,
|
KDecorationDefines::BorderSize KWinDecorationModule::indexToBorderSize( int index,
|
||||||
Q3ValueList< BorderSize > sizes )
|
QList< BorderSize > sizes )
|
||||||
{
|
{
|
||||||
Q3ValueList< BorderSize >::ConstIterator it = sizes.begin();
|
QList< BorderSize >::ConstIterator it = sizes.begin();
|
||||||
for(;
|
for(;
|
||||||
it != sizes.end();
|
it != sizes.end();
|
||||||
++it, --index )
|
++it, --index )
|
||||||
|
@ -305,7 +304,7 @@ void KWinDecorationModule::slotBorderChanged( int size )
|
||||||
if( lBorder->isHidden())
|
if( lBorder->isHidden())
|
||||||
return;
|
return;
|
||||||
emit KCModule::changed( true );
|
emit KCModule::changed( true );
|
||||||
Q3ValueList< BorderSize > sizes;
|
QList< BorderSize > sizes;
|
||||||
if( plugins->factory() != NULL )
|
if( plugins->factory() != NULL )
|
||||||
sizes = plugins->factory()->borderSizes();
|
sizes = plugins->factory()->borderSizes();
|
||||||
assert( sizes.count() >= 2 );
|
assert( sizes.count() >= 2 );
|
||||||
|
@ -325,7 +324,7 @@ QString KWinDecorationModule::decorationName( QString& libName )
|
||||||
{
|
{
|
||||||
QString decoName;
|
QString decoName;
|
||||||
|
|
||||||
Q3ValueList<DecorationInfo>::Iterator it;
|
QList<DecorationInfo>::Iterator it;
|
||||||
for( it = decorations.begin(); it != decorations.end(); ++it )
|
for( it = decorations.begin(); it != decorations.end(); ++it )
|
||||||
if ( (*it).libraryName == libName )
|
if ( (*it).libraryName == libName )
|
||||||
{
|
{
|
||||||
|
@ -343,7 +342,7 @@ QString KWinDecorationModule::decorationLibName( const QString& name )
|
||||||
|
|
||||||
// Find the corresponding library name to that of
|
// Find the corresponding library name to that of
|
||||||
// the current plugin name
|
// the current plugin name
|
||||||
Q3ValueList<DecorationInfo>::Iterator it;
|
QList<DecorationInfo>::Iterator it;
|
||||||
for( it = decorations.begin(); it != decorations.end(); ++it )
|
for( it = decorations.begin(); it != decorations.end(); ++it )
|
||||||
if ( (*it).name == name )
|
if ( (*it).name == name )
|
||||||
{
|
{
|
||||||
|
@ -563,7 +562,7 @@ void KWinDecorationModule::defaults()
|
||||||
|
|
||||||
void KWinDecorationModule::checkSupportedBorderSizes()
|
void KWinDecorationModule::checkSupportedBorderSizes()
|
||||||
{
|
{
|
||||||
Q3ValueList< BorderSize > sizes;
|
QList< BorderSize > sizes;
|
||||||
if( plugins->factory() != NULL )
|
if( plugins->factory() != NULL )
|
||||||
sizes = plugins->factory()->borderSizes();
|
sizes = plugins->factory()->borderSizes();
|
||||||
if( sizes.count() < 2 ) {
|
if( sizes.count() < 2 ) {
|
||||||
|
@ -571,7 +570,7 @@ void KWinDecorationModule::checkSupportedBorderSizes()
|
||||||
cBorder->hide();
|
cBorder->hide();
|
||||||
} else {
|
} else {
|
||||||
cBorder->clear();
|
cBorder->clear();
|
||||||
for (Q3ValueList<BorderSize>::const_iterator it = sizes.begin(); it != sizes.end(); ++it) {
|
for (QList<BorderSize>::const_iterator it = sizes.begin(); it != sizes.end(); ++it) {
|
||||||
BorderSize size = *it;
|
BorderSize size = *it;
|
||||||
cBorder->insertItem(i18n(border_names[size]), borderSizeToIndex(size,sizes) );
|
cBorder->insertItem(i18n(border_names[size]), borderSizeToIndex(size,sizes) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#include "kwindecorationIface.h"
|
#include "kwindecorationIface.h"
|
||||||
//Added by qt3to4:
|
//Added by qt3to4:
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <Q3ValueList>
|
|
||||||
|
|
||||||
class KComboBox;
|
class KComboBox;
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
|
@ -101,14 +100,14 @@ class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface
|
||||||
void resetPlugin( KConfig* conf, const QString& currentDecoName = QString::null );
|
void resetPlugin( KConfig* conf, const QString& currentDecoName = QString::null );
|
||||||
void resetKWin();
|
void resetKWin();
|
||||||
void checkSupportedBorderSizes();
|
void checkSupportedBorderSizes();
|
||||||
static int borderSizeToIndex( BorderSize size, Q3ValueList< BorderSize > sizes );
|
static int borderSizeToIndex( BorderSize size, QList< BorderSize > sizes );
|
||||||
static BorderSize indexToBorderSize( int index, Q3ValueList< BorderSize > sizes );
|
static BorderSize indexToBorderSize( int index, QList< BorderSize > sizes );
|
||||||
|
|
||||||
QTabWidget* tabWidget;
|
QTabWidget* tabWidget;
|
||||||
|
|
||||||
// Page 1
|
// Page 1
|
||||||
KComboBox* decorationList;
|
KComboBox* decorationList;
|
||||||
Q3ValueList<DecorationInfo> decorations;
|
QList<DecorationInfo> decorations;
|
||||||
|
|
||||||
KDecorationPreview* preview;
|
KDecorationPreview* preview;
|
||||||
KDecorationPlugins* plugins;
|
KDecorationPlugins* plugins;
|
||||||
|
|
Loading…
Reference in a new issue