blob: fcf2a771e72841407a3b0ece9f56c299da321b34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/***************************************************************************
* Copyright (C) 2003 by Roberto Raggi *
* roberto@tdevelop.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <kiconloader.h>
#include <klocale.h>
#include <kdevgenericfactory.h>
#include <kstdaction.h>
#include <tdemainwindow.h>
#include <kmenubar.h>
#include <kdevcore.h>
#include <kdevmainwindow.h>
#include <kdevplugininfo.h>
#include "fullscreen_part.h"
static const KDevPluginInfo data("kdevfullscreen");
typedef KDevGenericFactory<FullScreenPart> FullScreenFactory;
K_EXPORT_COMPONENT_FACTORY( libkdevfullscreen, FullScreenFactory( data ) )
FullScreenPart::FullScreenPart(TQObject *parent, const char *name, const TQStringList& )
: KDevPlugin(&data, parent, name ? name : "FullScreenPart" )
{
setInstance(FullScreenFactory::instance());
// const TDEAboutData &abdata1 = *(info());
// kdDebug() << abdata1.appName() << endl;
const KDevPluginInfo &_info = *info();
const TDEAboutData *abdata = _info;
kdDebug() << abdata->appName() << endl;
setXMLFile("kdevpart_fullscreen.rc");
m_bFullScreen = false;
m_pFullScreen = KStdAction::fullScreen(this, TQT_SLOT(slotToggleFullScreen()), actionCollection(), mainWindow()->main());
}
FullScreenPart::~FullScreenPart()
{
}
void FullScreenPart::slotToggleFullScreen( )
{
m_bFullScreen = !m_bFullScreen;
if( m_bFullScreen ){
//mw->menuBar()->hide();
mainWindow()->main()->showFullScreen();
/*m_pFullScreen->setText( i18n( "Exit Full-Screen Mode" ) );
m_pFullScreen->setToolTip( i18n( "Exit full-screen mode" ) );
m_pFullScreen->setIcon( "window_nofullscreen" );*/
} else {
//mw->menuBar()->show();
mainWindow()->main()->showNormal();
/*m_pFullScreen->setText( i18n( "&Full-Screen Mode" ) );
m_pFullScreen->setToolTip(i18n("Full-screen mode"));
m_pFullScreen->setIcon( "window_fullscreen" );*/
}
}
#include "fullscreen_part.moc"
|