1
/***************************************************************************
2
* Copyright (C) 2003 by Roberto Raggi *
3
* roberto@kdevelop.org *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
***************************************************************************/
12
#include <kiconloader.h>
14
#include <kdevgenericfactory.h>
15
#include <kstdaction.h>
16
#include <kmainwindow.h>
20
#include <kdevmainwindow.h>
21
#include <kdevplugininfo.h>
23
#include "fullscreen_part.h"
25
static const KDevPluginInfo data("kdevfullscreen");
27
typedef KDevGenericFactory<FullScreenPart> FullScreenFactory;
28
K_EXPORT_COMPONENT_FACTORY( libkdevfullscreen, FullScreenFactory( data ) )
30
FullScreenPart::FullScreenPart(QObject *parent, const char *name, const QStringList& )
31
: KDevPlugin(&data, parent, name ? name : "FullScreenPart" )
33
setInstance(FullScreenFactory::instance());
34
// const KAboutData &abdata1 = *(info());
35
// kdDebug() << abdata1.appName() << endl;
36
const KDevPluginInfo &_info = *info();
37
const KAboutData *abdata = _info;
38
kdDebug() << abdata->appName() << endl;
39
setXMLFile("kdevpart_fullscreen.rc");
41
m_bFullScreen = false;
43
m_pFullScreen = KStdAction::fullScreen(this, SLOT(slotToggleFullScreen()), actionCollection(), mainWindow()->main());
46
FullScreenPart::~FullScreenPart()
50
void FullScreenPart::slotToggleFullScreen( )
52
m_bFullScreen = !m_bFullScreen;
54
//mw->menuBar()->hide();
55
mainWindow()->main()->showFullScreen();
57
/*m_pFullScreen->setText( i18n( "Exit Full-Screen Mode" ) );
58
m_pFullScreen->setToolTip( i18n( "Exit full-screen mode" ) );
59
m_pFullScreen->setIcon( "window_nofullscreen" );*/
61
//mw->menuBar()->show();
63
mainWindow()->main()->showNormal();
65
/*m_pFullScreen->setText( i18n( "&Full-Screen Mode" ) );
66
m_pFullScreen->setToolTip(i18n("Full-screen mode"));
67
m_pFullScreen->setIcon( "window_fullscreen" );*/
72
#include "fullscreen_part.moc"