📄 filelistview.h
字号:
#include <eikcmbut.h>
#include <qiktoolbar.h>
#include "bjackicon.h"
#include "dialogs.h"
#include "marquee.h"
#include "viewbase.h"
#if !defined(__FILELISTVIEW_H__)
#define __FILELISTVIEW_H__
class CCRCCalculator;
/*************************************************************
*
* File browser view. This is the second view
*
**************************************************************/
class CSMan2FileListView : public CViewBase, public MCoeControlObserver, public MCoeView
{
protected: // implements MCoeView
virtual void ViewDeactivated();
virtual void ViewActivatedL(const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/);
public:
CSMan2FileListView(CConfig *cData);
virtual TVwsViewId ViewId() const;
virtual TVwsViewIdAndMessage ViewScreenDeviceChangedL();
virtual TBool ViewScreenModeCompatible(TInt aScreenMode);
TInt populateClipboard(TInt op);
void SetZoomLevel(TInt zoomLevel);
CCRCCalculator *crcCalculator;
public:
~CSMan2FileListView();
TBuf<(MAX_LOG_LINES + 1) * MAX_LOG_LINE_SIZE> beamLog;
CBlueBeam *blueBeam;
void ConstructL(const TRect& aRect);
void HandlePointerEventL(const TPointerEvent& aPointerEvent);
CEikColumnListBox *cFileListBox;
TPath currentPath;
void fillListBox(TPath thePath);
CDir *fileList;
CEikTextButton *labelCurrentFolder;
TBuf<50> textFileDateTime;
CEikTextButton *labelFileDateTime;
void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
CMarquee *currentPathScroller;
CArrayFixSeg<TFileName> *clipBoard;
// "Cut" or "Copy" ??
TInt clipBoardOperation;
void doCRC(TPtrC fileName);
private:
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
void getFileAttrib(TDes *attribText, TInt index);
HBufC* driveOldPath[KMaxDrives];
TInt oldItem;
void updateFileDateTime(void);
};
/*************************************************************
*
* Provides asynchronous CRC calculation
*
**************************************************************/
#define CRC_BUFFER_SIZE 1024
class CCRCCalculator : public CActive
{
public:
CCRCCalculator();
~CCRCCalculator();
enum
{
CRCCancelled,
CRCError
};
void doCRC(TPtrC fileName);
void DoCancel();
void RunL();
TBool crcDialogActive;
private:
unsigned int crcTable[256];
TUint crcValue;
TBuf8<CRC_BUFFER_SIZE> inputBuffer;
//HBufC8* inputBuffer;
RFile inputStream;
CCRCDialog* crcDialog;
void stopCRC(TInt aReason);
void finishCRC();
TInt fileSize;
TInt numBytesRead;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -