[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/plasma
From: Matt Broadstone <mbroadst () gmail ! com>
Date: 2007-03-01 0:29:58
Message-ID: 1172708998.182946.6191.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 638170 by mbroadst:
Get rid of unneeded widgets
M +8 -11 desktop.cpp
M +3 -4 desktop.h
M +2 -0 plasmaapp.cpp
--- trunk/KDE/kdebase/workspace/plasma/plasma/desktop.cpp #638169:638170
@@ -10,17 +10,16 @@
#include "desktop.moc"
Desktop::Desktop(QWidget *parent)
- : QWidget(parent)
+ : QGraphicsView(parent)
{
int primaryScreen = QApplication::desktop()->primaryScreen();
QRect desktopSize = QApplication::desktop()->screenGeometry(primaryScreen);
setGeometry(desktopSize);
- m_graphicsView = new QGraphicsView;
m_graphicsScene = new QGraphicsScene(desktopSize);
- m_graphicsView->setScene(m_graphicsScene);
- m_graphicsView->setRenderHint(QPainter::Antialiasing, false);
- m_graphicsView->setDragMode(QGraphicsView::RubberBandDrag);
+ setScene(m_graphicsScene);
+ setRenderHint(QPainter::Antialiasing, false);
+ setDragMode(QGraphicsView::RubberBandDrag);
// Give it some silly default background
QPixmap tile(100, 100);
@@ -30,18 +29,16 @@
pt.fillRect(0, 0, 50, 50, color);
pt.fillRect(50, 50, 50, 50, color);
pt.end();
- m_graphicsView->setBackgroundBrush(tile);
+ setBackgroundBrush(tile);
- QVBoxLayout *layout = new QVBoxLayout(this);
- layout->setMargin(0);
- layout->setSpacing(0);
- layout->addWidget(m_graphicsView);
-
// Make us legit via KWin
KWin::setType( winId(), NET::Desktop );
KWin::setState( winId(), NET::SkipPager );
KWin::setOnAllDesktops( winId(), true );
}
+Desktop::~Desktop()
+{
+}
--- trunk/KDE/kdebase/workspace/plasma/plasma/desktop.h #638169:638170
@@ -19,18 +19,17 @@
#ifndef DESKTOP_H
#define DESKTOP_H
-#include <QWidget>
+#include <QGraphicsView>
-class QGraphicsView;
class QGraphicsScene;
-class Desktop : public QWidget
+class Desktop : public QGraphicsView
{
Q_OBJECT
public:
Desktop(QWidget *parent = 0);
+ ~Desktop();
private:
- QGraphicsView *m_graphicsView;
QGraphicsScene *m_graphicsScene;
};
--- trunk/KDE/kdebase/workspace/plasma/plasma/plasmaapp.cpp #638169:638170
@@ -107,6 +107,8 @@
void PlasmaApp::notifyStartup(bool completed)
{
+ Q_UNUSED(completed)
+
/*
const QString startupID("workspace desktop");
DCOPClient cl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic