~ubuntu-branches/ubuntu/maverick/freecad/maverick

« back to all changes in this revision

Viewing changes to src/Gui/CombiView.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-07-16 18:37:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090716183741-oww9kcxqrk991i1n
Tags: upstream-0.8.2237
Import upstream version 0.8.2237

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (c) 2009 J�rgen Riegel <juergen.riegel@web.de>              *
 
3
 *                                                                         *
 
4
 *   This file is part of the FreeCAD CAx development system.              *
 
5
 *                                                                         *
 
6
 *   This library is free software; you can redistribute it and/or         *
 
7
 *   modify it under the terms of the GNU Library General Public           *
 
8
 *   License as published by the Free Software Foundation; either          *
 
9
 *   version 2 of the License, or (at your option) any later version.      *
 
10
 *                                                                         *
 
11
 *   This library  is distributed in the hope that it will be useful,      *
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
14
 *   GNU Library General Public License for more details.                  *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU Library General Public     *
 
17
 *   License along with this library; see the file COPYING.LIB. If not,    *
 
18
 *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
 
19
 *   Suite 330, Boston, MA  02111-1307, USA                                *
 
20
 *                                                                         *
 
21
 ***************************************************************************/
 
22
 
 
23
 
 
24
#include "PreCompiled.h"
 
25
 
 
26
/// Here the FreeCAD includes sorted by Base,App,Gui......
 
27
 
 
28
#include "CombiView.h"
 
29
#include "BitmapFactory.h"
 
30
#include "iisTaskPanel/include/iisTaskPanel"
 
31
#include "PropertyView.h"
 
32
#include "Application.h"
 
33
#include "Document.h"
 
34
#include "ViewProvider.h"
 
35
#include "Tree.h"
 
36
#include "TaskView/TaskView.h"
 
37
#include "propertyeditor/PropertyEditor.h"
 
38
 
 
39
using namespace Gui;
 
40
using namespace Gui::DockWnd;
 
41
 
 
42
 
 
43
CombiView::CombiView(Gui::Document* pcDocument, QWidget *parent)
 
44
  : DockWindow(pcDocument,parent)
 
45
{
 
46
    setWindowTitle(tr("CombiView"));
 
47
 
 
48
    QGridLayout* pLayout = new QGridLayout(this); 
 
49
    pLayout->setSpacing( 0 );
 
50
    pLayout->setMargin ( 0 );
 
51
 
 
52
    // tabs to switch between Tree/Properties and TaskPanel
 
53
    tabs = new QTabWidget ();
 
54
    tabs->setObjectName(QString::fromUtf8("combiTab"));
 
55
    tabs->setTabPosition(QTabWidget::North);
 
56
    //tabs->setTabShape(QTabWidget::Triangular);
 
57
    pLayout->addWidget( tabs, 0, 0 );
 
58
 
 
59
    // splitter between tree and property view
 
60
    QSplitter *splitter = new QSplitter();
 
61
    splitter->setOrientation(Qt::Vertical);
 
62
 
 
63
    // tree widget
 
64
    tree =  new TreeWidget(this);
 
65
    //tree->setRootIsDecorated(false);
 
66
    splitter->addWidget(tree);
 
67
 
 
68
    // property view
 
69
    prop = new PropertyView(this);
 
70
    splitter->addWidget(prop);
 
71
 
 
72
    tabs->addTab(splitter,trUtf8("Project"));
 
73
 
 
74
    // task panel
 
75
    taskPanel = new Gui::TaskView::TaskView(this);
 
76
    tabs->addTab(taskPanel, trUtf8("Tasks"));
 
77
}
 
78
 
 
79
CombiView::~CombiView()
 
80
{
 
81
}
 
82
 
 
83
#include "moc_CombiView.cpp"