Create a DeclarativeView instead of GraphicsView
Now we cannot see anything any more, but hey it compiles :-)icc-effect-5.14.5
parent
d8ce81d241
commit
e801c12c69
|
@ -12,7 +12,7 @@ set(kwin3_aurorae_PART_SRCS
|
|||
|
||||
kde4_add_plugin(kwin3_aurorae ${kwin3_aurorae_PART_SRCS})
|
||||
|
||||
target_link_libraries(kwin3_aurorae ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} kdecorations)
|
||||
target_link_libraries(kwin3_aurorae ${KDE4_KDEUI_LIBS} ${KDE4_PLASMA_LIBS} ${QT_QTDECLARATIVE_LIBRARY} kdecorations)
|
||||
|
||||
install(TARGETS kwin3_aurorae DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QApplication>
|
||||
#include <QGraphicsView>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QtDeclarative/QDeclarativeView>
|
||||
#include <QtDeclarative/QDeclarativeContext>
|
||||
|
||||
#include <KConfig>
|
||||
#include <KConfigGroup>
|
||||
|
@ -186,17 +188,17 @@ void AuroraeClient::init()
|
|||
widget()->setAttribute(Qt::WA_TranslucentBackground);
|
||||
widget()->setAttribute(Qt::WA_NoSystemBackground);
|
||||
widget()->installEventFilter(this);
|
||||
m_view = new QGraphicsView(m_scene, widget());
|
||||
m_view = new QDeclarativeView(widget());
|
||||
m_view->setResizeMode(QDeclarativeView::SizeRootObjectToView);
|
||||
m_view->setAttribute(Qt::WA_TranslucentBackground);
|
||||
m_view->setFrameShape(QFrame::NoFrame);
|
||||
m_view->setWindowFlags(Qt::X11BypassWindowManagerHint);
|
||||
QPalette pal = m_view->palette();
|
||||
pal.setColor(m_view->backgroundRole(), Qt::transparent);
|
||||
m_view->setPalette(pal);
|
||||
QPalette pal2 = widget()->palette();
|
||||
pal2.setColor(widget()->backgroundRole(), Qt::transparent);
|
||||
widget()->setPalette(pal2);
|
||||
m_view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
m_view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
m_view->rootContext()->setContextProperty("decoration", this);
|
||||
// scene initialisation
|
||||
m_scene->setActive(isActive(), false);
|
||||
m_scene->setIcon(icon());
|
||||
|
|
|
@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <kdecoration.h>
|
||||
#include <kdecorationfactory.h>
|
||||
|
||||
class QDeclarativeView;
|
||||
class QGraphicsSceneMouseEvent;
|
||||
class QGraphicsView;
|
||||
class QGraphicsScene;
|
||||
|
||||
namespace Aurorae
|
||||
|
@ -136,7 +136,7 @@ private:
|
|||
void updateWindowShape();
|
||||
void checkTabs(bool force = false);
|
||||
AuroraeScene *m_scene;
|
||||
QGraphicsView *m_view;
|
||||
QDeclarativeView *m_view;
|
||||
bool m_clickInProgress;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue