2013-06-03 22:20:23 +02:00
|
|
|
#ifndef DEFS_H
|
|
|
|
#define DEFS_H
|
|
|
|
|
2013-06-16 17:36:10 +02:00
|
|
|
#include <QtGlobal>
|
2013-11-18 21:45:15 +01:00
|
|
|
|
2013-08-30 17:40:17 +02:00
|
|
|
#if QT_VERSION >= 0x050000
|
2013-08-30 20:26:39 +02:00
|
|
|
#include <qwebkitglobal.h>
|
|
|
|
#elif QT_VERSION >= 0x040600
|
2013-08-30 17:40:17 +02:00
|
|
|
#include <qwebkitversion.h>
|
|
|
|
#endif
|
2013-06-03 22:20:23 +02:00
|
|
|
|
|
|
|
#define CMAKE_VERSION "@CMAKE_VERSION@"
|
|
|
|
#define CMAKE_SYSTEM "@CMAKE_SYSTEM@"
|
|
|
|
|
|
|
|
#define APP_NAME "@APP_NAME@"
|
|
|
|
#define APP_LOW_NAME "@APP_LOW_NAME@"
|
|
|
|
#define APP_LOW_H_NAME ".@APP_LOW_NAME@"
|
2013-06-26 19:04:38 +02:00
|
|
|
#define APP_LONG_NAME "@APP_NAME@ @APP_VERSION@"
|
2013-06-03 22:20:23 +02:00
|
|
|
#define APP_AUTHORS "@APP_AUTHOR@"
|
|
|
|
#define APP_URL "@APP_URL@"
|
|
|
|
#define APP_VERSION "@APP_VERSION@"
|
2013-08-30 20:26:39 +02:00
|
|
|
|
|
|
|
#if QT_VERSION >= 0x040600
|
|
|
|
#define APP_USERAGENT QString("@APP_NAME@/@APP_VERSION@ (@APP_URL@) on @CMAKE_SYSTEM@; Webkit/") + qWebKitVersion()
|
|
|
|
#else
|
|
|
|
#define APP_USERAGENT QString("@APP_NAME@/@APP_VERSION@ (@APP_URL@) on @CMAKE_SYSTEM@;")
|
|
|
|
#endif
|
2013-06-03 22:20:23 +02:00
|
|
|
|
2013-09-23 20:49:14 +02:00
|
|
|
#define TEXT_TITLE_LIMIT 30
|
2013-10-15 21:10:54 +02:00
|
|
|
#define MAX_ZOOM_FACTOR 10.0
|
|
|
|
#define DATABASE_DRIVER "QSQLITE"
|
|
|
|
|
2013-10-20 11:51:09 +02:00
|
|
|
#define APP_DB_INIT_FILE "db_init.sql"
|
|
|
|
#define APP_DB_INIT_SPLIT "-- !\n"
|
2013-10-15 21:10:54 +02:00
|
|
|
#define APP_DB_PATH "data/database/local"
|
|
|
|
#define APP_DB_FILE "database.db"
|
2013-11-15 22:09:38 +01:00
|
|
|
#define APP_DB_WEB_PATH "data/database/web"
|
2013-09-23 20:49:14 +02:00
|
|
|
|
2013-09-23 20:14:58 +02:00
|
|
|
#define APP_CFG_PATH "data/config"
|
|
|
|
#define APP_CFG_FILE "config.ini"
|
2013-06-03 22:20:23 +02:00
|
|
|
#define APP_CFG_GUI "gui"
|
2013-06-14 10:50:11 +02:00
|
|
|
#define APP_CFG_GEN "main"
|
2013-07-07 15:17:25 +02:00
|
|
|
#define APP_CFG_PROXY "proxy"
|
2013-06-30 15:22:44 +02:00
|
|
|
#define APP_CFG_CUTS "keyboard"
|
2013-07-24 19:06:09 +02:00
|
|
|
#define APP_CFG_BROWSER "browser"
|
2013-06-03 22:20:23 +02:00
|
|
|
|
2013-09-30 18:18:23 +02:00
|
|
|
#define APP_HTML_MARKUP "styled_pattern.html"
|
2013-06-03 22:20:23 +02:00
|
|
|
#define APP_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
|
|
|
#define APP_REVISION "@APP_REVISION@"
|
|
|
|
|
2013-06-09 22:24:10 +02:00
|
|
|
#define APP_IS_RUNNING "app_is_running"
|
2013-11-12 19:42:09 +01:00
|
|
|
#define APP_THEME_PATH_QRC ":/themes"
|
2013-11-15 11:03:12 +01:00
|
|
|
#define APP_SKIN_DEFAULT "base/vergilius.xml"
|
2013-11-15 11:38:21 +01:00
|
|
|
#define APP_THEME_DEFAULT "mini-kfaenza"
|
2013-06-09 22:24:10 +02:00
|
|
|
|
2013-11-17 16:41:44 +01:00
|
|
|
// Indexes of columns as they are DEFINED IN THE TABLE for MESSAGES.
|
|
|
|
#define MSG_DB_ID_INDEX 0
|
|
|
|
#define MSG_DB_READ_INDEX 1
|
|
|
|
#define MSG_DB_DELETED_INDEX 2
|
|
|
|
#define MSG_DB_IMPORTANT_INDEX 3
|
|
|
|
#define MSG_DB_FEED_INDEX 4
|
|
|
|
#define MSG_DB_TITLE_INDEX 5
|
|
|
|
#define MSG_DB_URL_INDEX 6
|
|
|
|
#define MSG_DB_AUTHOR_INDEX 7
|
|
|
|
#define MSG_DB_DCREATED_INDEX 8
|
|
|
|
#define MSG_DB_DUPDATED_INDEX 9
|
|
|
|
#define MSG_DB_CONTENTS_INDEX 10
|
|
|
|
|
|
|
|
// Indexes of columns as they are USED IN THE MODEL for MESSAGES.
|
|
|
|
#define MSG_MODEL_READ_INDEX 0
|
|
|
|
#define MSG_MODEL_IMPORTANT_INDEX 1
|
|
|
|
#define MSG_MODEL_TITLE_INDEX 2
|
|
|
|
#define MSG_MODEL_AUTHOR_INDEX 3
|
|
|
|
#define MSG_MODEL_DCREATED_INDEX 4
|
|
|
|
#define MSG_MODEL_DUPDATED_INDEX 5
|
|
|
|
|
2013-06-03 22:20:23 +02:00
|
|
|
#if defined(Q_OS_LINUX)
|
2013-06-24 20:19:20 +02:00
|
|
|
#define APP_DESKTOP_ENTRY_PATH "@DESKTOP_ENTRY@"
|
|
|
|
#define APP_DESKTOP_ENTRY_FILE "@APP_LOW_NAME@.desktop"
|
2013-06-14 10:50:11 +02:00
|
|
|
#define APP_LANG_PATH APP_PREFIX + QString("/share/rssguard/l10n")
|
|
|
|
#define APP_SKIN_PATH APP_PREFIX + QString("/share/rssguard/skins")
|
|
|
|
#define APP_INFO_PATH APP_PREFIX + QString("/share/rssguard/information")
|
|
|
|
#define APP_THEME_PATH APP_PREFIX + QString("/share/rssguard/themes")
|
2013-10-20 11:51:09 +02:00
|
|
|
#define APP_MISC_PATH APP_PREFIX + QString("/share/rssguard/misc")
|
2013-09-30 16:47:10 +02:00
|
|
|
#define APP_HTML_PATH APP_PREFIX + QString("/share/rssguard/html")
|
2013-07-02 17:30:33 +02:00
|
|
|
#define APP_THEME_SYSTEM QString()
|
2013-06-27 19:57:23 +02:00
|
|
|
#define APP_FLAGS_PATH APP_PREFIX + QString("/share/rssguard/flags")
|
2013-06-18 19:03:55 +02:00
|
|
|
#define APP_ICON_PATH APP_PREFIX + QString("/share/icons/hicolor/128x128/apps/@APP_LOW_NAME@.png")
|
|
|
|
#define APP_ICON_PLAIN_PATH APP_PREFIX + QString("/share/icons/hicolor/128x128/apps/@APP_LOW_NAME@_plain.png")
|
2013-11-24 14:44:45 +01:00
|
|
|
#elif defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
2013-06-03 22:20:23 +02:00
|
|
|
#define APP_LANG_PATH QApplication::applicationDirPath() + QString("/l10n")
|
|
|
|
#define APP_SKIN_PATH QApplication::applicationDirPath() + QString("/skins")
|
|
|
|
#define APP_INFO_PATH QApplication::applicationDirPath()
|
2013-06-13 09:47:42 +02:00
|
|
|
#define APP_THEME_PATH QApplication::applicationDirPath() + QString("/themes")
|
2013-10-20 11:51:09 +02:00
|
|
|
#define APP_MISC_PATH QApplication::applicationDirPath() + QString("/misc")
|
2013-09-30 16:47:10 +02:00
|
|
|
#define APP_HTML_PATH QApplication::applicationDirPath() + QString("/html")
|
2013-08-03 07:34:41 +02:00
|
|
|
#define APP_THEME_SYSTEM "-"
|
2013-06-27 19:57:23 +02:00
|
|
|
#define APP_FLAGS_PATH QApplication::applicationDirPath() + QString("/flags")
|
2013-06-18 19:03:55 +02:00
|
|
|
#define APP_ICON_PATH QApplication::applicationDirPath() + QString("/@APP_LOW_NAME@.png")
|
|
|
|
#define APP_ICON_PLAIN_PATH QApplication::applicationDirPath() + QString("/@APP_LOW_NAME@_plain.png")
|
2013-06-03 22:20:23 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // DEFS_H
|