~ubuntu-branches/ubuntu/lucid/kdebase/lucid

« back to all changes in this revision

Viewing changes to kate/interfaces/toolviewmanager.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Ana Beatriz Guerrero Lopez
  • Date: 2009-04-05 05:22:13 UTC
  • mfrom: (0.4.2 experimental) (0.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 235.
  • Revision ID: james.westby@ubuntu.com-20090405052213-39thr4l6p2ss07uj
Tags: 4:4.2.2-1
* New upstream release:
  - khtml fixes. (Closes: #290285, #359680)
  - Default konsole sessions can be deleted. (Closes: #286342)
  - Tag widget uses standard application palette. (Closes: #444800)
  - ... and surely many more but we have lost track...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This file is part of the KDE project
2
 
   Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org>
3
 
 
4
 
   This library is free software; you can redistribute it and/or
5
 
   modify it under the terms of the GNU Library General Public
6
 
   License version 2 as published by the Free Software Foundation.
7
 
 
8
 
   This library is distributed in the hope that it will be useful,
9
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11
 
   Library General Public License for more details.
12
 
 
13
 
   You should have received a copy of the GNU Library General Public License
14
 
   along with this library; see the file COPYING.LIB.  If not, write to
15
 
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
 
   Boston, MA 02110-1301, USA.
17
 
*/
18
 
 
19
 
#include "toolviewmanager.h"
20
 
#include "toolviewmanager.moc"
21
 
 
22
 
#include "plugin.h"
23
 
#include "documentmanager.h"
24
 
#include "pluginmanager.h"
25
 
 
26
 
#include "../app/katemainwindow.h"
27
 
 
28
 
namespace Kate
29
 
{
30
 
 
31
 
class PrivateToolViewManager
32
 
  {
33
 
  public:
34
 
    PrivateToolViewManager ()
35
 
    {
36
 
    }
37
 
 
38
 
    ~PrivateToolViewManager ()
39
 
    {
40
 
    }
41
 
 
42
 
    KateMainWindow *toolViewMan;
43
 
  };
44
 
 
45
 
ToolViewManager::ToolViewManager (void *toolViewManager) : QObject ((KateMainWindow*) toolViewManager)
46
 
{
47
 
  d = new PrivateToolViewManager ();
48
 
  d->toolViewMan = (KateMainWindow*) toolViewManager;
49
 
}
50
 
 
51
 
ToolViewManager::~ToolViewManager ()
52
 
{
53
 
  delete d;
54
 
}
55
 
 
56
 
QWidget *ToolViewManager::createToolView (const QString &identifier, ToolViewManager::Position pos, const QPixmap &icon, const QString &text)
57
 
{
58
 
  return d->toolViewMan->createToolView (identifier, (KMultiTabBar::KMultiTabBarPosition)pos, icon, text);
59
 
}
60
 
 
61
 
bool ToolViewManager::moveToolView (QWidget *widget, ToolViewManager::Position  pos)
62
 
{
63
 
  if (!widget || !widget->qt_cast("KateMDI::ToolView"))
64
 
    return false;
65
 
 
66
 
  return d->toolViewMan->moveToolView (static_cast<KateMDI::ToolView*>(widget), (KMultiTabBar::KMultiTabBarPosition)pos);
67
 
}
68
 
 
69
 
bool ToolViewManager::showToolView(QWidget *widget)
70
 
{
71
 
  if (!widget || !widget->qt_cast("KateMDI::ToolView"))
72
 
    return false;
73
 
 
74
 
  return d->toolViewMan->showToolView (static_cast<KateMDI::ToolView*>(widget));
75
 
}
76
 
 
77
 
bool ToolViewManager::hideToolView(QWidget *widget)
78
 
{
79
 
  if (!widget || !widget->qt_cast("KateMDI::ToolView"))
80
 
    return false;
81
 
 
82
 
  return d->toolViewMan->hideToolView (static_cast<KateMDI::ToolView*>(widget));
83
 
}
84
 
 
85
 
}