~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to ksysguard/gui/Workspace.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    KSysGuard, the KDE System Guard
 
3
 
 
4
    Copyright (c) 1999, 2000 Chris Schlaeger <cs@kde.org>
 
5
 
 
6
    This program is free software; you can redistribute it and/or
 
7
    modify it under the terms of the GNU General Public
 
8
    License version 2 or at your option version 3 as published by
 
9
    the Free Software Foundation.
 
10
 
 
11
    This program 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 General Public License for more details.
 
15
 
 
16
    You should have received a copy of the GNU General Public License
 
17
    along with this program; if not, write to the Free Software
 
18
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
19
 
 
20
*/
 
21
 
 
22
#ifndef KSG_WORKSPACE_H
 
23
#define KSG_WORKSPACE_H
 
24
 
 
25
#include <KTabWidget>
 
26
#include <kdirwatch.h>
 
27
 
 
28
class KConfig;
 
29
class KUrl;
 
30
class QString;
 
31
class WorkSheet;
 
32
 
 
33
class Workspace : public KTabWidget
 
34
{
 
35
  Q_OBJECT
 
36
 
 
37
  public:
 
38
    explicit Workspace( QWidget* parent);
 
39
    ~Workspace();
 
40
 
 
41
    void saveProperties( KConfigGroup& cfg );
 
42
    void readProperties( const KConfigGroup& cfg );
 
43
 
 
44
    bool saveOnQuit();
 
45
 
 
46
    bool restoreWorkSheet( const QString &fileName, bool switchToTab = true);
 
47
    QList<WorkSheet *> getWorkSheets() const { return mSheetList; }
 
48
    WorkSheet *currentWorkSheet();
 
49
 
 
50
  public Q_SLOTS:
 
51
    void newWorkSheet();
 
52
    void importWorkSheet();
 
53
    void importWorkSheet( const KUrl& );
 
54
    bool saveWorkSheet( WorkSheet *sheet );
 
55
    void exportWorkSheet();
 
56
    void exportWorkSheet( WorkSheet *sheet );
 
57
    void removeWorkSheet();
 
58
    void removeWorkSheet( const QString &fileName );
 
59
    void removeAllWorkSheets();
 
60
    void getHotNewWorksheet();
 
61
    void uploadHotNewWorksheet();
 
62
    void cut();
 
63
    void copy();
 
64
    void paste();
 
65
    void configure();
 
66
    void updateSheetTitle( QWidget* );
 
67
    void applyStyle();
 
68
    void refreshActiveWorksheet();
 
69
 
 
70
  private Q_SLOTS:
 
71
    virtual void contextMenu (int, const QPoint &);
 
72
 
 
73
  Q_SIGNALS:
 
74
    void setCaption( const QString &text);
 
75
 
 
76
  private:
 
77
    QList<WorkSheet *> mSheetList;
 
78
 
 
79
    QString makeNameForNewSheet() const;
 
80
    KDirWatch mDirWatch;
 
81
};
 
82
 
 
83
#endif