Note that the location of the database in Linux has changed from
~/.local/share/data/Toastfreeware/ConfClerk
to
~/.local/share/Toastfreeware/ConfClerk
TEMPLATE = app
TARGET = confclerk
DESTDIR = ../bin
TEMPLATE = app
TARGET = confclerk
DESTDIR = ../bin
+QT += sql xml network widgets
CONFIG(maemo5) {
QT += maemo5
}
CONFIG(maemo5) {
QT += maemo5
}
- info.append(QString("<h1>%1</h1>\n").arg(Qt::escape(event.title())));
+ info.append(QString("<h1>%1</h1>\n").arg(event.title().toHtmlEscaped()));
// persons
info += QString("<h2>%1</h2>\n").arg(tr("Persons"));
QStringList persons = event.persons();
// persons
info += QString("<h2>%1</h2>\n").arg(tr("Persons"));
QStringList persons = event.persons();
- for (int i = 0; i != persons.size(); ++i) persons[i] = Qt::escape(persons[i]);
+ for (int i = 0; i != persons.size(); ++i) persons[i] = persons[i].toHtmlEscaped();
info += QString("<p>%1</p>\n").arg(persons.join(", "));
// abstract
info += QString("<p>%1</p>\n").arg(persons.join(", "));
// abstract
QString name(i.key());
if (url.isEmpty() || url == "http://") continue;
if (name.isEmpty()) name = url;
QString name(i.key());
if (url.isEmpty() || url == "http://") continue;
if (name.isEmpty()) name = url;
- info += QString("<li><a href=\"%1\">%2</a></li>\n").arg(Qt::escape(url), Qt::escape(name));
+ info += QString("<li><a href=\"%1\">%2</a></li>\n").arg(url.toHtmlEscaped(), name.toHtmlEscaped());
}
info += QString("</ul>\n");
eventInfoTextBrowser->setHtml(info);
}
info += QString("</ul>\n");
eventInfoTextBrowser->setHtml(info);
CONFIG += static
QT += sql \
xml \
CONFIG += static
QT += sql \
xml \
QMAKE_CLEAN += ../bin/libgui.a
# module dependencies
QMAKE_CLEAN += ../bin/libgui.a
# module dependencies
+OTHER_FILES += \
+ test.qml
+
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtGui/QMainWindow>
#include "ui_mainwindow.h"
#include "ui_mainwindow.h"
#ifndef SEARCHHEAD_H
#define SEARCHHEAD_H
#ifndef SEARCHHEAD_H
#define SEARCHHEAD_H
-#include <QtGui/QWidget>
#include <QDebug>
#include "ui_searchhead.h"
#include <QDebug>
#include "ui_searchhead.h"
// reinitialize list from database
void reinit()
{
// reinitialize list from database
void reinit()
{
conferences = Conference::getAll();
conferences = Conference::getAll();
}
QList<Conference> conferences;
}
QList<Conference> conferences;
option.rect.x()+SPACER,
option.rect.y()+option.rect.height()-fmBig.descent());
painter->setFont(fontBig);
option.rect.x()+SPACER,
option.rect.y()+option.rect.height()-fmBig.descent());
painter->setFont(fontBig);
- painter->drawText(titlePointF,qVariantValue<QString>(index.data()));
+ painter->drawText(titlePointF,index.data().value<QString>());
#ifndef DELEGATE_H
#define DELEGATE_H
#ifndef DELEGATE_H
#define DELEGATE_H
class Delegate : public QItemDelegate
{
class Delegate : public QItemDelegate
{
// multiple of one hour.
void EventModel::createTimeGroups()
{
// multiple of one hour.
void EventModel::createTimeGroups()
{
mGroups.clear();
mParents.clear();
if (mEvents.empty()) return;
mGroups.clear();
mParents.clear();
if (mEvents.empty()) return;
// the last group needs a title as well
mGroups.last().setTitle(mEvents);
// the last group needs a title as well
mGroups.last().setTitle(mEvents);
}
void EventModel::createTrackGroups() {
}
void EventModel::createTrackGroups() {
- return createIndex(row, column, 0);
+ return createIndex(row, column, (quintptr) 0);
}
else if (parent.internalId() == 0)
{
}
else if (parent.internalId() == 0)
{
Event * event = static_cast<Event*>(index.internalPointer());
Event * event = static_cast<Event*>(index.internalPointer());
- return createIndex(mParents[event->id()], 0, 0);
+ return createIndex(mParents[event->id()], 0, (quintptr) 0);
void EventModel::clearModel()
{
void EventModel::clearModel()
{
mGroups.clear();
mEvents.clear();
mParents.clear();
mGroups.clear();
mEvents.clear();
mParents.clear();
TARGET = mvc
DESTDIR = ../bin
CONFIG += static
TARGET = mvc
DESTDIR = ../bin
CONFIG += static
QMAKE_CLEAN += ../bin/libmvc.a
# module dependencies
QMAKE_CLEAN += ../bin/libmvc.a
# module dependencies
#include <QSqlRecord>
#include <QVariant>
#include <QDateTime>
#include <QSqlRecord>
#include <QVariant>
#include <QDateTime>
+#include <QStandardPaths>
-#include <QDesktopServices>
#include "sqlengine.h"
#include "track.h"
#include "conference.h"
#include "sqlengine.h"
#include "track.h"
#include "conference.h"
const QString TIME_FORMAT ("hh:mm");
SqlEngine::SqlEngine(QObject *aParent): QObject(aParent) {
const QString TIME_FORMAT ("hh:mm");
SqlEngine::SqlEngine(QObject *aParent): QObject(aParent) {
- QDir dbPath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
+ QDir dbPath(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
dbFilename = dbPath.absoluteFilePath("ConfClerk.sqlite");
}
dbFilename = dbPath.absoluteFilePath("ConfClerk.sqlite");
}