projects
/
dorian
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bad language.
[dorian]
/
platform.cpp
diff --git
a/platform.cpp
b/platform.cpp
index
24ceed9
..
4fc6dee
100644
(file)
--- a/
platform.cpp
+++ b/
platform.cpp
@@
-1,5
+1,6
@@
#include <QtGlobal>
#include <QDir>
#include <QtGlobal>
#include <QDir>
+#include <QtGui>
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
# include <unistd.h>
#if defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
# include <unistd.h>
@@
-33,6
+34,22
@@
static const char *DORIAN_VERSION =
# include <QMessageBox>
#endif
# include <QMessageBox>
#endif
+static Platform *theInstance;
+
+Platform *Platform::instance()
+{
+ if (!theInstance) {
+ theInstance = new Platform();
+ }
+ return theInstance;
+}
+
+void Platform::close()
+{
+ delete theInstance;
+ theInstance = 0;
+}
+
QString Platform::dbPath()
{
QString base(QDir::home().absoluteFilePath(DORIAN_BASE));
QString Platform::dbPath()
{
QString base(QDir::home().absoluteFilePath(DORIAN_BASE));
@@
-107,3
+124,17
@@
QString Platform::traceFileName()
{
return QDir::home().absoluteFilePath(DORIAN_LOG);
}
{
return QDir::home().absoluteFilePath(DORIAN_LOG);
}
+
+int Platform::defaultZoom()
+{
+ return 150;
+}
+
+QString Platform::defaultOrientation()
+{
+#ifdef Q_OS_SYMBIAN
+ return QString("portrait");
+#else
+ return QString("landscape");
+#endif
+}