|
1 /*! This is an example application demonstrating how a simple Hb |
|
2 application is created. This application implements a folder |
|
3 browser. The application creates two views. The main view (Folder |
|
4 view) shows the folder contents. The second view (Settings view) can |
|
5 be used to set the path which is shown in the Folder view. Settings |
|
6 view uses the HbFormView. Folder view inherits HbView and implements |
|
7 a couple of methods to populate the Folder view. */ |
|
8 |
|
9 #include <hbapplication.h> |
|
10 #include <hbmainwindow.h> |
|
11 #include <hbmenu.h> |
|
12 #include <hbaction.h> |
|
13 #include <hbtoolbar.h> |
|
14 |
|
15 |
|
16 #include <gst/gst_global.h> |
|
17 #include <stdlib.h> |
|
18 #include <gst/gst.h> |
|
19 |
|
20 #include "folderview.h" |
|
21 #include "views.h" |
|
22 |
|
23 int main(int argc, char *argv[]) |
|
24 { |
|
25 // Create HbApplication |
|
26 gst_init (&argc, &argv); |
|
27 HbApplication a(argc, argv); |
|
28 a.setApplicationName(QObject::tr("Folder Browser")); |
|
29 //LOG(_L("Entering main.cpp")); |
|
30 |
|
31 // Create main window |
|
32 HbMainWindow mainWindow; |
|
33 |
|
34 // Create View#1 : Folder view |
|
35 HbView *folderView = new FolderView; |
|
36 // Title pane text |
|
37 folderView->setTitle(QObject::tr("QtGSTPlayer")); |
|
38 |
|
39 // Add two views to main window, |
|
40 // the adding order determines which one is shown first |
|
41 |
|
42 mainWindow.addView(folderView); |
|
43 /*mainWindow.addView(settingsView);*/ |
|
44 |
|
45 // Store the mainwindow ptr. |
|
46 Views::win = &mainWindow; |
|
47 |
|
48 // Show main window |
|
49 mainWindow.show(); |
|
50 |
|
51 return a.exec(); |
|
52 } |