Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Examples  

workspacewindow.h

Go to the documentation of this file.
00001 
00002 //
00003 // YASA workspace window declarations
00004 //
00005 // Project: Yasa 2
00006 // Author : Jan Blumenthal
00007 // Start  : 2002/02/28
00008 // $Header: /sources/yasa/yasagui/workspacewindow.h,v 1.4 2003/01/24 15:47:44 bj Exp $
00009 //
00011 //
00012 // This program is free software; you can redistribute it and/or modify
00013 // it under the terms of the GNU General Public License as published by
00014 // the Free Software Foundation; either version 2 of the License, or
00015 // (at your option) any later version.
00016 //
00017 // This program is distributed in the hope that it will be useful,
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 // GNU General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU General Public License
00023 // along with this program (See the included file COPYING);
00024 // if not, write to the Free Software Foundation, Inc.,
00025 // 675 Mass Ave, Cambridge, MA 02139, USA.
00026 //
00028 // This file contains all information about workspace windows
00030 #ifndef YASAGUI_WORKSPACEWINDOW_INCLUDE
00031 #define YASAGUI_WORKSPACEWINDOW_INCLUDE
00032 
00033 
00035 #include "mainwindow.h"
00036 #include "widgets.h"
00037 #include "workspace.h"
00038 
00039 
00042 class YWorkSpaceFrame : public YObjectFrame
00043 {   Q_OBJECT
00044     QScrollView         scrollview;
00045 public:                 YWorkSpaceFrame(QWidget *parent, YFrameArgs &args) :
00046                         YObjectFrame(args),
00047                         scrollview(parent)
00048                         {}
00049     virtual int         InitInstance();
00050     virtual QWidget*    GetMainWidget()                             { return &scrollview;   }
00051     static YFrame*      CreateWorkSpaceFrame(QWidget *parent, YFrameArgs &args)
00052                         {
00053                             return new YWorkSpaceFrame(parent, args);
00054                         }
00055 };
00056 
00057 
00059 class YAuthorWidget : public YStringWidget
00060 {   Q_OBJECT
00061 public:                 YAuthorWidget(YObject *object, QWidget *parent) : YStringWidget(object, parent) {   UpdateWidget(); }
00062 public slots:
00063     virtual void        UpdateWidget()                          { if ( text()!=((YWorkSpace*)object)->GetAuthor())
00064                                                                     setText(((YWorkSpace*)object)->GetAuthor() );       }
00065     virtual void        UpdateValue( const QString &t)          { ((YWorkSpace*)object)->SetAuthor( t );                }
00066 };
00067 
00068 
00070 class YCreationTimeWidget : public YDateTimeWidget
00071 {   Q_OBJECT
00072 public:                 YCreationTimeWidget(YWorkSpace *workspace, QWidget *parent) : YDateTimeWidget(workspace, parent)
00073                         {   UpdateWidget(); }
00074 public slots:
00075     virtual void        UpdateWidget()                          {   if ( GetDateTime()!=((YWorkSpace*)object)->GetCreationTime() )
00076                                                                     SetDateTime( ((YWorkSpace*)object)->GetCreationTime() ); }
00077     virtual void        UpdateValue(const QDateTime &date)          { ((YWorkSpace*)object)->SetCreationTime( date );       }
00078 };
00079 
00081 class YLastChangedWidget : public YDateTimeWidget
00082 {   Q_OBJECT
00083 public:                 YLastChangedWidget(YWorkSpace *workspace, QWidget *parent) : YDateTimeWidget(workspace, parent)
00084                         {   UpdateWidget(); }
00085 public slots:
00086     virtual void        UpdateWidget()                          {   if ( GetDateTime() != ((YWorkSpace*)object)->GetLastChangedTime() )
00087                                                                     SetDateTime( ((YWorkSpace*)object)->GetLastChangedTime() ); }
00088     virtual void        UpdateValue(const QDateTime &date)      { ((YWorkSpace*)object)->SetLastChangedTime( date );            }
00089 };
00090 
00092 #endif                                                                          // ifndef YASAGUI_WORKSPACEWINDOW_INCLUDE

Generated on Thu Feb 13 23:43:58 2003 for Yasa by doxygen1.3-rc3