⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guiclock8.h__.htm

📁 symbian clock 源代码..........
💻 HTM
字号:
<html><head><title>Exercise_GUIClock.rar GUIClock8.h</title>
<LINK href="/inc/read_style.css" type=text/css rel=stylesheet></head>
<body>
<p><a href=http://www.pudn.com>www.pudn.com</a> &gt; <a href="http://www.pudn.com/downloads91/sourcecode/comm/symbian/detail348522.html">Exercise_GUIClock.rar</a> &gt GUIClock8.h</p><!-- saved from http://www.pudn.com -->
<script src="/inc/gg_read1.js"></script><BR>
<pre name="code" class="h">
// GUIClock.h 
// ------------ 
// 
// Copyright (c) 2000 Symbian Ltd.  All rights reserved. 
// 
 
//////////////////////////////////////////////////////////////////// 
// GUIClock  
// ---------- 
// 
// 
// The class definitions for the simple GUIClock application 
// containing a single view with the text "Hello World !" drawn 
// on it. 
// 
// The class definitions are: 
// 
// CGUIClocklication  
// CGUIClockUi 
// CGUIClockView 
// CGUIClockDocument 
// 
// 
//////////////////////////////////////////////////////////////////// 
#ifndef __GUIClock_H 
#define __GUIClock_H 
 
#include <coeccntx.h> 
 
/* 
#include <eikenv.h> 
#include <eikappui.h> 
#include <eikapp.h> 
#include <eikdoc.h> 
#include <eikmenup.h> 
#include <eikon.hrh> 
*/ 
 
#include <aknViewAppUi.h> 
#include <aknapp.h> 
#include <akndoc.h> 
 
 
#include <GUIClock8.rsg> 
#include "GUIClock8.hrh" 
 
#include "simpleclock.h" 
#include "aknview.h" 
#include "setting.h" 
 
//////////////////////////////////////////////////////////////////////// 
// 
// CGUIClocklication 
// 
//////////////////////////////////////////////////////////////////////// 
 
class CGUIClockApplication : public CAknApplication 
{ 
private:  
	// Inherited from class CApaApplication 
	CApaDocument* CreateDocumentL(); 
	TUid AppDllUid() const; 
}; 
 
//////////////////////////////////////////////////////////////////////// 
// 
// CGUIClockAppView 
// 
//////////////////////////////////////////////////////////////////////// 
class CDiaClockCtrl; 
class CDigClockCtrl; 
 
class CGUIClockMainContainer : public CCoeControl,public MClockObserver 
{ 
public: 
	static CGUIClockMainContainer* NewL(const TRect& aRect); 
	CGUIClockMainContainer(); 
	~CGUIClockMainContainer(); 
    void ConstructL(const TRect& aRect); 
	 
	TInt  CountComponentControls() const { return 2;} 
	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); 
	void UpdateClock(TTime aTime); 
	 
protected: 
	CCoeControl* ComponentControl(TInt aIndex) const; 
	void SizeChanged(); 
	 
private: 
	void Draw(const TRect& /*aRect*/) const; 
	 
private: 
	TDateTime iDateTime; 
	CDiaClockCtrl * iDiaClock; 
	TRect		    iDiaClockRect; 
	CDigClockCtrl * iDigClock; 
	TRect		    iDigClockRect; 
	TInt			iSelectIndex; 
}; 
 
 
class CGUIClockMainView: public CAknView 
{ 
public: 
    static CGUIClockMainView* NewLC(); 
    static CGUIClockMainView* NewL(); 
    ~CGUIClockMainView(); 
	 
public: // from CAknView 
 
    TUid Id() const; 
	 
	void DoActivateL(const TVwsViewId& aPrevViewId, 
		TUid aCustomMessageId, 
		const TDesC8& aCustomMessage); 
	 
	void DoDeactivate(); 
	void HandleCommandL(TInt aCommand); 
		 
	MClockObserver * GetClockObserver();  
	 
private: 
	 
    CGUIClockMainView(); 
	 
    void ConstructL(); 
	 
private: 
	 
    /*! @var iContainer container for this view */ 
    CGUIClockMainContainer * iContainer; 
	 
    /*! @var iIdentifier identifier for this view */ 
    TUid iIdentifier; 
}; 
 
 
 
class CGUIClockAboutContainer : public CCoeControl 
{ 
public: 
	static CGUIClockAboutContainer* NewL(const TRect& aRect); 
 
	CGUIClockAboutContainer(); 
	~CGUIClockAboutContainer(); 
 
    void ConstructL(const TRect& aRect); 
	 
	 
private: 
	void Draw(const TRect& /*aRect*/) const; 
	 
private: 
	HBufC * iAboutString; 
}; 
 
 
class CGUIClockAboutView: public CAknView 
{ 
public: 
    static CGUIClockAboutView* NewLC(); 
    static CGUIClockAboutView* NewL(); 
    ~CGUIClockAboutView(); 
	 
public: // from CAknView 
	 
    TUid Id() const; 
    void HandleCommandL(TInt aCommand); 
	 
	void DoActivateL(const TVwsViewId& aPrevViewId, 
		TUid aCustomMessageId, 
		const TDesC8& aCustomMessage); 
	 
	void DoDeactivate(); 
	 
private: 
	 
    CGUIClockAboutView(); 
	 
    void ConstructL(); 
	 
private: 
	 
    /*! @var iContainer container for this view */ 
    CGUIClockAboutContainer * iContainer; 
	 
    /*! @var iIdentifier identifier for this view */ 
    TUid iIdentifier; 
}; 
 
 
//////////////////////////////////////////////////////////////////////// 
// 
// CGUIClockUi 
// 
//////////////////////////////////////////////////////////////////////// 
class CGUIClockDocument; 
class CGUIClockUi : public CAknViewAppUi /*CAknAppUi */ 
{ 
public: 
    void ConstructL(); 
	 
private: 
	// Inherirted from class CEikAppUi 
	void HandleCommandL(TInt aCommand); 
	CGUIClockDocument* GetDocument(); 
	 
private: 
	TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); 
 
private: 
	CGUIClockMainView * iMainView; 
	CGUIClockAboutView *iAboutView; 
}; 
 
 
//////////////////////////////////////////////////////////////////////// 
// 
// CGUIClockDocument 
// 
//////////////////////////////////////////////////////////////////////// 
class CAlarm; 
class CGUIClockDocument : public CAknDocument 
{ 
public: 
	static CGUIClockDocument* NewL(CAknApplication& aApp); 
	CGUIClockDocument(CAknApplication& aApp);    
	~CGUIClockDocument(); 
	void ConstructL(); 
	 
	CFileStore* OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs); 
 
	void StoreL(CStreamStore& aStore, CStreamDictionary& aStreamDic) const; 
	void RestoreL(const CStreamStore& aStore, const CStreamDictionary& aStreamDic); 
 
	CSimpleClock *GetClock(){return iClock;} 
	 
	TSetting Setting(){return iSetting;} 
	void SetSetting(TSetting & aSetting) 
	{ 
		iSetting = aSetting; 
	} 
 
	void SetAlarmTime(TTime aTime); 
private:  
    // Inherited from CEikDocument 
	CEikAppUi* CreateAppUiL(); 
private: 
	CSimpleClock * iClock; 
	TSetting	iSetting; 
	CAlarm		*iAlarm; 
	friend class CGUIClockUi; 
}; 
 
#endif 
 
</pre>
<script src="/inc/gg_read2.js"></script><BR>
<script src="http://s117.cnzz.com/stat.php?id=1236358&web_id=1236358&show=pic" language="JavaScript" charset="gb2312"></script>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -