51
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef FBEDITORVIEW_H
|
|
19 |
#define FBEDITORVIEW_H
|
|
20 |
|
|
21 |
#include <hbview.h>
|
|
22 |
|
|
23 |
class HbTextEdit;
|
|
24 |
class HbAction;
|
|
25 |
|
|
26 |
class FbEditorView : public HbView
|
|
27 |
{
|
|
28 |
Q_OBJECT
|
|
29 |
|
|
30 |
public:
|
|
31 |
FbEditorView();
|
|
32 |
~FbEditorView();
|
|
33 |
void open(const QString& fileName, bool flagReadOnly);
|
|
34 |
|
|
35 |
signals:
|
|
36 |
void finished(bool ok);
|
|
37 |
|
|
38 |
private slots:
|
|
39 |
void backButtonClicked();
|
|
40 |
void displayInText();
|
|
41 |
void displayInHex();
|
|
42 |
void updateMenu();
|
|
43 |
|
|
44 |
/*
|
|
45 |
void newFile();
|
|
46 |
bool save();
|
|
47 |
bool saveAs();
|
|
48 |
void about();
|
|
49 |
void documentWasModified();
|
|
50 |
*/
|
|
51 |
|
|
52 |
|
|
53 |
private:
|
|
54 |
void loadFile(const QString &fileName);
|
|
55 |
void createMenu();
|
|
56 |
|
|
57 |
// editor
|
|
58 |
HbTextEdit *mTextEdit;
|
|
59 |
// if flag true, file is currently in hex format
|
|
60 |
bool mFileHex;
|
|
61 |
bool mFlagReadOnly;
|
|
62 |
QString mFileName;
|
|
63 |
QString mFileContent;
|
|
64 |
|
|
65 |
HbAction* mToTextAction;
|
|
66 |
HbAction* mToHexAction;
|
|
67 |
HbAction* mExitAction;
|
|
68 |
};
|
|
69 |
|
|
70 |
#endif // FBEDITORVIEW_H
|