[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdemultimedia/noatun/app
From:       Stefan Gehn <mETz81 () web ! de>
Date:       2007-01-25 19:25:58
Message-ID: 1169753158.721092.7102.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 627127 by metz:

- deprecated--


 M  +4 -1      app.cpp  
 M  +19 -13    pluginmodule.cpp  


--- trunk/KDE/kdemultimedia/noatun/app/app.cpp #627126:627127
@@ -81,7 +81,10 @@
 
 void NoatunApp::slotNewFrontend()
 {
-	setMainWidget(mGlobal->frontend()->mainWindow());
+//TODO: KDE4 QApplication has no so called mainwindow anymore,
+//           is this slot needed at all?
+
+//	setMainWidget(mGlobal->frontend()->mainWindow());
 }
 
 #include "app.moc"
--- trunk/KDE/kdemultimedia/noatun/app/pluginmodule.cpp #627126:627127
@@ -27,6 +27,7 @@
 
 #include <qapplication.h>
 #include <qstyle.h>
+#include <qstyleoption.h>
 #include <qpainter.h>
 #include <qfont.h>
 #include <q3header.h>
@@ -94,26 +95,30 @@
 	{
 		QStyle &style = *qApp->style();
 
-		int s = QStyle::State_Enabled;
-		s |= mPluginEnabled ? QStyle::State_On : QStyle::State_Off;
+		QStyleOption styleOpt;
+		//styleOpt.initFrom(this);
+
+		styleOpt.state |= QStyle::State_Enabled;
+		styleOpt.state |= mPluginEnabled ? QStyle::State_On : QStyle::State_Off;
+
 		int boxW = QMIN(
 			width,
 			style.pixelMetric(mIsRadio ? QStyle::PM_ExclusiveIndicatorWidth : QStyle::PM_IndicatorWidth)
 		);
+
 		int boxH = QMIN(
 			height(),
 			style.pixelMetric(mIsRadio ? QStyle::PM_ExclusiveIndicatorHeight :QStyle::PM_IndicatorHeight)
 		);
+
 		int boxLeft = (width - boxW) / 2;
 		int boxTop = (height() - boxH) / 2;
 
 /*		style.drawPrimitive(
-			mIsRadio ? QStyle::PE_Q3CheckListExclusiveIndicator : QStyle::PE_Q3CheckListIndicator,
-			0,
-			p,
-			s
-		);
-*/	}
+			mIsRadio ? QStyle::PE_IndicatorRadioButton : QStyle::PE_IndicatorCheckBox,
+			&option,
+			p);*/
+	}
 	else
 	{
 		Q3ListViewItem::paintCell(p, cg, column, width, alignment);
@@ -130,8 +135,9 @@
 PluginSelectorPage::PluginSelectorPage(Global *glob, QObject *parent)
 	: PreferencesPage(glob, parent, i18n("Plugin Selection"), i18n("Select your plugins"), "gear")
 {
-	(new QVBoxLayout(frame()))->setAutoAdd(true);
+	QLayout *l = new QVBoxLayout(frame());
 	QWidget *ww = new QWidget(frame());
+	l->addWidget(ww);
 	mWidget = new Ui::PluginModuleWidget;
 	mWidget->setupUi(ww);
 	mChanged = false;
@@ -268,24 +274,24 @@
 	mUpdating = true;
 	PluginListItem *pli = 0;
 
-	if (interfaces.find("none") != interfaces.end())
+	if (interfaces.contains("none"))
 	{
 		pli = mOthersDict[pluginName];
 	}
 	else
 	{
-		if (interfaces.find("visualization") != interfaces.end())
+		if (interfaces.contains("visualization"))
 		{
 			pli = mVisDict[pluginName];
 		}
 
-		if (interfaces.find("userinterface") != interfaces.end())
+		if (interfaces.contains("userinterface"))
 		{
 			mCurrentUI = pluginName;
 			pli = mUIDict[pluginName];
 		}
 
-		if (interfaces.find("playlist") != interfaces.end())
+		if (interfaces.contains("playlist"))
 		{
 			mCurrentPL = pluginName;
 			pli = mPLDict[pluginName];
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic