equal
deleted
inserted
replaced
|
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 EDITORVIEW_H |
|
19 #define EDITORVIEW_H |
|
20 |
|
21 #include <hbview.h> |
|
22 #include <hbmainwindow.h> |
|
23 //#include <QtGui> |
|
24 |
|
25 class HbTextEdit; |
|
26 class HbAction; |
|
27 |
|
28 class EditorView : public HbView |
|
29 { |
|
30 Q_OBJECT |
|
31 |
|
32 public: |
|
33 EditorView(HbMainWindow &mainWindow); |
|
34 ~EditorView(); |
|
35 void open(const QString& fileName, bool flagReadOnly); |
|
36 |
|
37 signals: |
|
38 void finished(bool ok); |
|
39 |
|
40 private slots: |
|
41 void backButtonClicked(); |
|
42 void displayInText(); |
|
43 void displayInHex(); |
|
44 void updateMenu(); |
|
45 |
|
46 /* |
|
47 void newFile(); |
|
48 bool save(); |
|
49 bool saveAs(); |
|
50 void about(); |
|
51 void documentWasModified(); |
|
52 */ |
|
53 |
|
54 |
|
55 private: |
|
56 void loadFile(const QString &fileName); |
|
57 void createMenu(); |
|
58 |
|
59 /* Main Window of folderbrowser */ |
|
60 HbMainWindow &mMainWindow; |
|
61 // editor |
|
62 HbTextEdit *mTextEdit; |
|
63 // if flag true, file is currently in hex format |
|
64 bool mFileHex; |
|
65 bool mFlagReadOnly; |
|
66 QString mFileName; |
|
67 QString mFileContent; |
|
68 |
|
69 HbAction* mToTextAction; |
|
70 HbAction* mToHexAction; |
|
71 HbAction* mExitAction; |
|
72 |
|
73 }; |
|
74 |
|
75 #endif // EDITORVIEW_H |