Example #1
0
/*!
	The main entry point of the clock application.

	Constructs the view manager object.
 */
int main(int argc, char *argv[])
{
	OstTraceFunctionEntry0( _MAIN_ENTRY );
	// Create and initialize an ClockApplication instance
	QScopedPointer<ClockApplication> application(
				new ClockApplication(argc, argv));
	
	// Main window widget.
	// Includes decorator such as signal strength and battery life indicator.
	HbMainWindow window;
	window.setRenderHints(
			QPainter::HighQualityAntialiasing | QPainter::SmoothPixmapTransform);
	window.setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);

	// Load the translation file.
	HbTranslator translator("clock");
	translator.loadCommon();
	
	// Construct the application controller.
	application->createController();

	// Show widget
	window.show();

	// Start the event loop for the application
	return application->execution();
}
Example #2
0
/*!
	The main() function.

	Responsible for constructing the NotesApplication object and showing the
	main window.
 */
int main(int argc, char *argv[])
{
	OstTraceFunctionEntry0( _MAIN_ENTRY );
	// Create and initialize an NotesApplication instance
	QScopedPointer<NotesApplication> application(
			new NotesApplication(argc, argv));
	//NotesApplication *application = new NotesApplication(argc, argv);

	// Main window for providing the scene context
	HbMainWindow window;
	window.setRenderHints(
			QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
	window.setViewportUpdateMode(QGraphicsView::MinimalViewportUpdate);

	// Load the translation file.
	HbTranslator notesViewsTranslator("notes");
	notesViewsTranslator.loadCommon();

	// Construct the application controller.
	application->createController();
	
	// Show the main window.
	window.show();
	
	// Start the event loop for the application
	return application->execution();
}