confclerk-0.6.0/ 0000775 0001750 0001750 00000000000 12156157674 012775 5 ustar gregoa gregoa confclerk-0.6.0/confclerk.pro 0000664 0001750 0001750 00000003044 12156157674 015466 0 ustar gregoa gregoa # confclerk.pro
QMAKEVERSION = $$[QMAKE_VERSION]
ISQT4 = $$find(QMAKEVERSION, ^[2-9])
isEmpty( ISQT4 ) {
error("Use the qmake include with Qt4.4 or greater, on Debian that is qmake-qt4");
}
TEMPLATE = subdirs
SUBDIRS = src
# The global.pri defines the VERSION of the project
include(src/global.pri)
QMAKE_EXTRA_TARGETS += changelog icon man release releaseclean tarball
changelog.target = ChangeLog
changelog.commands = \
svn up && svn2cl --group-by-day --reparagraph
changelog.CONFIG = phony
icon.target = data/$${TARGET}.png
icon.commands = convert data/$${TARGET}.svg data/$${TARGET}.png
icon.depends = data/$${TARGET}.svg
man.target = data/$${TARGET}.1
man.commands = pod2man --utf8 --center=\"Offlince conference scheduler\" --release=\"Version $${VERSION}\" data/$${TARGET}.pod > data/$${TARGET}.1
man.depends = data/$${TARGET}.pod
release.depends = releaseclean tarball
releaseclean.commands = \
$(DEL_FILE) data/$${TARGET}.png data/$${TARGET}.1 ChangeLog
#releaseclean.CONFIG = phony
tarball.target = $${TARGET}-$${VERSION}.tar.gz
tarball.commands = \
$(DEL_FILE) -r $${TARGET}-$${VERSION} ; \
$(MKDIR) $${TARGET}-$${VERSION} ; \
$(COPY_DIR) * $${TARGET}-$${VERSION}/ ; \
$(DEL_FILE) $${TARGET}-$${VERSION}/*.pro.user* \
$${TARGET}-$${VERSION}/$${TARGET}-$${VERSION}.tar.gz \
$(DEL_FILE) -r $${TARGET}-$${VERSION}/$${TARGET}-$${VERSION} \
$${TARGET}-$${VERSION}/Makefile ; \
tar -cz --exclude=.svn --exclude=*.tar.gz -f $$tarball.target $${TARGET}-$${VERSION} ; \
$(DEL_FILE) -r $${TARGET}-$${VERSION}
tarball.depends = changelog icon man
confclerk-0.6.0/AUTHORS 0000664 0001750 0001750 00000000502 12156157674 014042 0 ustar gregoa gregoa This is the AUTHORS file for ConfClerk. ConfClerk is the successor of
fosdem-schedule; cf. docs/fosdem-schedule for the historic documentation.
Francisco Fortes
Matus Hanzes
Martin Komara
Marek Timko
Matus Uzak
Monika Berendova
Pavol Korinek
Pavol Pavelka
Maksim Kirillov
Philipp Spitzer
gregor herrmann
Stefan Strahl
confclerk-0.6.0/INSTALL 0000664 0001750 0001750 00000001047 12156157674 014030 0 ustar gregoa gregoa This is the INSTALL file for ConfClerk. ConfClerk is the successor of
fosdem-schedule; cf. docs/fosdem-schedule for the historic documentation.
Note
ConfClerk is an application intended for mobile devices like the Nokia N810 and N900.
The preferred distribution is using a packaged version for your distribution.
Basic Installation
1. Type `qmake' to generate Makefiles.
2. Type `make' to compile the source code.
3. Type `make install' to install the executable.
4. Type `make uninstall' to remove all installed files form your system.
confclerk-0.6.0/src/ 0000775 0001750 0001750 00000000000 12156157674 013564 5 ustar gregoa gregoa confclerk-0.6.0/src/orm/ 0000775 0001750 0001750 00000000000 12156157674 014361 5 ustar gregoa gregoa confclerk-0.6.0/src/orm/ormrecord.h 0000664 0001750 0001750 00000013622 12156157674 016532 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef ORMRECORD_H
#define ORMRECORD_H
#include
#include
#include
#include
#include
#include
#include
class OrmException
{
public:
OrmException(const QString& text) : mText(text) {}
virtual ~OrmException(){}
virtual const QString& text() const { return mText; }
private:
QString mText;
};
class OrmNoObjectException : public OrmException
{
public:
OrmNoObjectException() : OrmException("No object exception"){}
~OrmNoObjectException(){}
};
class OrmSqlException : public OrmException
{
public:
OrmSqlException(const QString& text) : OrmException( QString("Sql error: ") + text ) {}
~OrmSqlException(){}
};
template
class OrmRecord : protected QSqlRecord
{
public:
OrmRecord();
static T hydrate(const QSqlRecord& record);
void update(QString col, QVariant value = QVariant()); // updates specified column 'col'
protected:
QVariant value(QString col) const;
void setValue(QString col, QVariant value);
static T loadOne(QSqlQuery query);
static QList load(QSqlQuery query);
// auxiliary methods
static QSqlRecord toRecord(const QList & columnList);
// all record items/columns are in one table
static QString columnsForSelect(const QString& prefix = QString());
static QString selectQuery();
static QString updateQuery();
static QVariant convertToC(QVariant value, QVariant::Type colType);
static QVariant convertToDb(QVariant value, QVariant::Type colType);
};
template
OrmRecord::OrmRecord()
{
QSqlRecord::operator=(T::sColumns);
}
template
T OrmRecord::hydrate(const QSqlRecord& record)
{
T object;
object.QSqlRecord::operator=(record);
return object;
}
// updates specified column 'col'
// if the value is not specified as an argument,
// it's taken from the record itself
// see also: setValue() method for more details
template
void OrmRecord::update(QString col, QVariant value)
{
QSqlQuery query;
query.prepare(QString(updateQuery() + "SET %1 = :col WHERE id = :id").arg(col));
if(value.isValid()) // take 'col' value from the method's arguments
query.bindValue(":col", value);
else // take 'col' value from the record; see setValue()
query.bindValue(":col", convertToDb(this->value(col), this->value(col).type()));
query.bindValue(":id", this->value("id"));
query.exec();
}
template
QVariant OrmRecord::value(QString col) const
{
return convertToC(QSqlRecord::value(col), T::sColumns.field(col).type());
}
template
void OrmRecord::setValue(QString col, QVariant value)
{
QSqlRecord::setValue(col, convertToDb(value, T::sColumns.field(col).type()));
}
template
T OrmRecord::loadOne(QSqlQuery query)
{
if (!query.isActive())
{
if (!query.exec())
{
throw OrmSqlException(query.lastError().text());
}
}
if (!query.next())
{
throw OrmNoObjectException();
}
return hydrate(query.record());
}
template
QList OrmRecord::load(QSqlQuery query)
{
if (!query.isActive())
{
if (!query.exec())
{
qDebug() << "Error: " << query.lastError().driverText() << "; Type: " << query.lastError().type();
throw OrmSqlException(query.lastError().text());
}
}
QList objects;
while (query.next())
{
objects << hydrate(query.record());
}
return objects;
}
template
QString OrmRecord::columnsForSelect(const QString& prefix)
{
QStringList prefixedColumns;
for (int i=0; i
QString OrmRecord::selectQuery()
{
return QString("SELECT %1 FROM %2 ").arg(columnsForSelect(), T::sTableName);
}
template
QString OrmRecord::updateQuery()
{
return QString("UPDATE %1 ").arg(T::sTableName);
}
template
QSqlRecord OrmRecord::toRecord(const QList & columnList)
{
QSqlRecord record;
for(int i=0; i< columnList.count(); i++)
{
record.append(columnList[i]);
}
return record;
}
template
QVariant OrmRecord::convertToC(QVariant value, QVariant::Type colType)
{
if (colType == QVariant::DateTime && value.canConvert())
{
QDateTime date;
date.setTimeSpec(Qt::UTC);
date.setTime_t(value.toUInt());
return date;
}
return value;
}
template
QVariant OrmRecord::convertToDb(QVariant value, QVariant::Type colType)
{
if (colType == QVariant::DateTime && value.canConvert())
{
QDateTime dateTime = value.toDateTime();
dateTime.setTimeSpec(Qt::UTC); // this is to avoid that dateTime.toTime_t changes the time depending on the local time zone
return dateTime.toTime_t();
}
return value;
}
#endif // ORMRECORD_H
confclerk-0.6.0/src/orm/orm.pro 0000664 0001750 0001750 00000000245 12156157674 015701 0 ustar gregoa gregoa TEMPLATE = lib
TARGET = orm
DESTDIR = ../bin
CONFIG += static
QT += sql
QMAKE_CLEAN += ../bin/liborm.a
# module dependencies
DEPENDPATH += .
HEADERS += ormrecord.h
confclerk-0.6.0/src/db.qrc 0000664 0001750 0001750 00000000212 12156157674 014653 0 ustar gregoa gregoa
dbschema001.sql
dbschema000to001.sql
confclerk-0.6.0/src/dbschema000.sql 0000664 0001750 0001750 00000005401 12156157674 016273 0 ustar gregoa gregoa BEGIN TRANSACTION;
CREATE TABLE CONFERENCE ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
, title VARCHAR UNIQUE NOT NULL
, subtitle VARCHAR
, venue VARCHAR
, city VARCHAR NOT NULL
, start INTEGER NOT NULL
, end INTEGER NOT NULL
, days INTEGER
, day_change INTEGER
, timeslot_duration INTEGER
, active INTEGER DEFAULT 0
, url VARCHAR);
CREATE TABLE TRACK ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
, xid_conference INTEGER NOT NULL
, name VARCHAR NOT NULL
, UNIQUE (xid_conference, name));
CREATE TABLE ROOM ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
, xid_conference INTEGER NOT NULL
, name VARCHAR NOT NULL
, picture VARCHAR NOT NULL
, UNIQUE (xid_conference, name));
CREATE TABLE PERSON ( id INTEGER NOT NULL
, xid_conference INTEGER NOT NULL
, name VARCHAR NOT NULL
, UNIQUE (xid_conference, name)
, PRIMARY KEY (id, xid_conference));
CREATE TABLE EVENT ( xid_conference INTEGER NOT NULL
, id INTEGER NOT NULL
, start INTEGER NOT NULL
, duration INTEGER NOT NULL -- duration of the event in seconds
, xid_track INTEGER NOT NULL REFERENCES TRACK(id)
, type VARCHAR
, language VARCHAR
, tag VARCHAR
, title VARCHAR NOT NULL
, subtitle VARCHAR
, abstract VARCHAR
, description VARCHAR
, favourite INTEGER DEFAULT 0
, alarm INTEGER DEFAULT 0
, PRIMARY KEY (xid_conference ,id)
, FOREIGN KEY(xid_conference) REFERENCES CONFERENCE(id)
, FOREIGN KEY(xid_track) REFERENCES TRACK(id));
CREATE TABLE EVENT_PERSON ( xid_conference INTEGER NOT NULL
, xid_event INTEGER NOT NULL
, xid_person INTEGER NOT NULL
, UNIQUE ( xid_conference , xid_event , xid_person ) ON CONFLICT REPLACE
, FOREIGN KEY(xid_conference) REFERENCES CONFERENCE(id)
, FOREIGN KEY(xid_conference, xid_event) REFERENCES EVENT(xid_conference, id)
, FOREIGN KEY(xid_conference, xid_person) REFERENCES PERSON(xid_conference, id));
CREATE TABLE EVENT_ROOM ( xid_conference INTEGER NOT NULL
, xid_event INTEGER NOT NULL
, xid_room INTEGER NOT NULL
, UNIQUE ( xid_conference , xid_event , xid_room ) ON CONFLICT REPLACE
, FOREIGN KEY(xid_conference) REFERENCES CONFERENCE(id)
, FOREIGN KEY(xid_conference, xid_event) REFERENCES EVENT(xid_conference, id)
, FOREIGN KEY(xid_conference, xid_room) REFERENCES ROOM(xid_conference, id));
CREATE TABLE LINK ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL
, xid_conference INTEGER NOT NULL
, xid_event INTEGER NOT NULL
, name VARCHAR
, url VARCHAR NOT NULL
, UNIQUE ( xid_conference , xid_event , url ) ON CONFLICT REPLACE
, FOREIGN KEY(xid_conference) REFERENCES CONFERENCE(id)
, FOREIGN KEY(xid_conference, xid_event) REFERENCES EVENT(xid_conference, id));
COMMIT;
confclerk-0.6.0/src/global.pri 0000664 0001750 0001750 00000001211 12156157674 015533 0 ustar gregoa gregoa # This is 'global.pri' file which defines
# GLOBAL definitions for the project
# include this file in each "*.pro" file, where it's needed
# USAGE: include(./global.pri)
# VERSION
VERSION = 0.6.0
DEFINES += VERSION=\\\"$$VERSION\\\"
# Define 'MAEMO' specific CONFIG/DEFINE
# To handle 'MAEMO' specific soruces/code
DISTRO = $$system(cat /etc/issue)
contains( DISTRO, [Mm]aemo ) {
# for 'MAEMO' specific source code parts
DEFINES += MAEMO
# for eg. including 'MAEMO' specific files
CONFIG += maemo
}
contains( DISTRO, [Ii]nternet ) {
contains( DISTRO, [Tt]ablet ) {
# Nokia N810 device
DEFINES += N810
}
}
confclerk-0.6.0/src/gui/ 0000775 0001750 0001750 00000000000 12156157674 014350 5 ustar gregoa gregoa confclerk-0.6.0/src/gui/dayviewtabcontainer.h 0000664 0001750 0001750 00000002321 12156157674 020561 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef DAYVIEWTABCONTAINER_H_
#define DAYVIEWTABCONTAINER_H_
#include "tabcontainer.h"
class DayViewTabContainer: public TabContainer {
Q_OBJECT
public:
DayViewTabContainer(QWidget *aParent);
virtual ~DayViewTabContainer() {}
public slots:
void expandTimeGroup(QTime time, int conferenceId);
protected:
virtual void loadEvents(const QDate &aDate, const int aConferenceId );
};
#endif /* DAYVIEWTABCONTAINER_H_ */
confclerk-0.6.0/src/gui/urlinputdialog.cpp 0000664 0001750 0001750 00000003261 12156157674 020120 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "urlinputdialog.h"
#include
#include
UrlInputDialog::UrlInputDialog(QWidget* parent)
: QDialog(parent)
{
setupUi(this);
QPushButton* openFile = buttons->addButton("Open File...", QDialogButtonBox::ActionRole);
connect(openFile, SIGNAL(clicked()), SLOT(openFileClicked()));
connect(buttons, SIGNAL(accepted()), SLOT(acceptClicked()));
connect(buttons, SIGNAL(rejected()), SLOT(rejectClicked()));
}
void UrlInputDialog::openFileClicked()
{
QString file = QFileDialog::getOpenFileName(this, "Select Conference Schedule", QString(), "Schedule Files (*.xml);;All Files(*)");
if (file.isNull()) {
return;
} else {
saved_result = file;
done(HaveFile);
}
}
void UrlInputDialog::acceptClicked()
{
saved_result = urlEntry->text();
setResult(HaveUrl);
}
void UrlInputDialog::rejectClicked()
{
setResult(Cancel);
}
confclerk-0.6.0/src/gui/conflictdialogcontainer.cpp 0000664 0001750 0001750 00000003041 12156157674 021736 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "conflictdialogcontainer.h"
ConflictDialogContainer::ConflictDialogContainer(QWidget *aParent)
: TabContainer( aParent ), mEventId(-1), mConferenceId(-1)
{}
void ConflictDialogContainer::setEventId(int aEventId, int conferenceId) {
mEventId = aEventId;
mConferenceId = conferenceId;
loadEvents();
}
void ConflictDialogContainer::loadEvents() {
static_cast(treeView->model())->loadConflictEvents(mEventId, mConferenceId);
treeView->setAllExpanded(true);
}
void ConflictDialogContainer::loadEvents(const QDate &aDate, const int aConferenceId) {
Q_UNUSED(aDate);
Q_UNUSED(aConferenceId);
Q_ASSERT(aConferenceId == mConferenceId);
Q_ASSERT(mConferenceId > 0);
Q_ASSERT(mEventId > 0);
loadEvents();
}
confclerk-0.6.0/src/gui/searchhead.cpp 0000664 0001750 0001750 00000002732 12156157674 017147 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "searchhead.h"
#include
SearchHead::SearchHead(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
QShortcut* shortcutEnter = new QShortcut(QKeySequence(Qt::Key_Enter), this, 0, 0, Qt::WidgetWithChildrenShortcut);
connect(shortcutEnter, SIGNAL(activated()), this, SLOT(searchButtonClicked()));
QShortcut* shortcutReturn = new QShortcut(QKeySequence(Qt::Key_Return), this, 0, 0, Qt::WidgetWithChildrenShortcut);
connect(shortcutReturn, SIGNAL(activated()), this, SLOT(searchButtonClicked()));
connect( searchButton, SIGNAL(clicked()), SLOT(searchButtonClicked()));
}
SearchHead::~SearchHead()
{
}
void SearchHead::searchButtonClicked()
{
emit( searchClicked() );
}
confclerk-0.6.0/src/gui/conferenceeditor.cpp 0000664 0001750 0001750 00000014443 12156157674 020400 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "conferenceeditor.h"
#include "conferencemodel.h"
#include "urlinputdialog.h"
#include "errormessage.h"
#include
#include
#include
#include
ConferenceEditor::ConferenceEditor(ConferenceModel* model, QWidget* parent)
: QDialog(parent)
, model(model)
, selected_id(-1)
{
setupUi(this);
progressBar->hide();
confView->setModel(model);
QItemSelectionModel* confViewSelection = new QItemSelectionModel(model, this);
confView->setSelectionModel(confViewSelection);
connect(confViewSelection, SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)),
SLOT(itemSelected(const QModelIndex&, const QModelIndex&)));
connect(this, SIGNAL(wantCurrent(const QModelIndex&, QItemSelectionModel::SelectionFlags)),
confViewSelection, SLOT(setCurrentIndex(const QModelIndex&, QItemSelectionModel::SelectionFlags)));
connect(addBtn, SIGNAL(clicked()), SLOT(addClicked()));
connect(removeBtn, SIGNAL(clicked()), SLOT(removeClicked()));
connect(changeUrl, SIGNAL(clicked()), SLOT(changeUrlClicked()));
connect(refreshBtn, SIGNAL(clicked()), SLOT(refreshClicked()));
connect(buttonBox, SIGNAL(rejected()), SLOT(close()));
// it's OK to emit selection signals here
// because they are not yet connected to anybody
int active_id = Conference::activeConference();
if (active_id > 0) {
emit wantCurrent(model->indexFromId(active_id), QItemSelectionModel::SelectCurrent);
} else {
itemSelected(QModelIndex(), QModelIndex());
}
}
void ConferenceEditor::conferenceRemoved()
{
if (model->rowCount() > 0) {
emit wantCurrent(model->index(0, 0), QItemSelectionModel::SelectCurrent);
} else {
itemSelected(QModelIndex(), QModelIndex());
}
}
void ConferenceEditor::itemSelected(const QModelIndex& current, const QModelIndex& previous)
{
// TODO: fill all required fields
Q_UNUSED(previous);
if (!current.isValid()) {
selected_id = -1;
emit noneConferenceSelected();
conferenceInfo->setCurrentIndex(1);
removeBtn->hide();
} else {
const Conference& conf = model->conferenceFromIndex(current);
selected_id = conf.id();
emit haveConferenceSelected(selected_id);
conferenceTitle->setText(conf.title());
conferenceSubtitle->setText(conf.subtitle());
conferenceWhere->setText(conf.city() + (!conf.venue().isEmpty() ? ", " + conf.venue() : ""));
conferenceWhen->setText(
conf.start().toString("yyyy-MM-dd")
+ " - " +
conf.end().toString("yyyy-MM-dd"));
conferenceInfo->setCurrentIndex(0);
removeBtn->show();
}
}
void ConferenceEditor::addClicked()
{
UrlInputDialog url_input(this);
switch (url_input.exec()) {
case UrlInputDialog::HaveUrl: emit haveConferenceUrl(url_input.url(), 0); break;
case UrlInputDialog::HaveFile: emit haveConferenceFile(url_input.url(), 0); break;
case UrlInputDialog::Cancel: return;
}
}
void ConferenceEditor::removeClicked()
{
if (selected_id < 0) {
// TODO: disable it when none is selected
return;
}
QMessageBox::StandardButton answer =
QMessageBox::question(0
, "Deletion confirmation"
, QString("Really delete the %1 conference").arg(Conference::getById(selected_id).title())
, QMessageBox::Yes | QMessageBox::No
, QMessageBox::No);
if (answer == QMessageBox::Yes) {
emit removeConferenceRequested(selected_id);
}
}
void ConferenceEditor::changeUrlClicked()
{
if (selected_id < 0) return;
const Conference& selectedConf = Conference::getById(selected_id);
bool ok;
QString url = QInputDialog::getText(this, "URL Input", "Enter schedule URL", QLineEdit::Normal, selectedConf.url(), &ok);
if (ok) {
emit changeUrlRequested(selected_id, url);
}
}
void ConferenceEditor::refreshClicked()
{
if (selected_id <= 0) return;
const Conference& selectedConf = Conference::getById(selected_id);
QString url = selectedConf.url();
if (url.isEmpty()) {
static const QString format("Schedule URL for %1 is not set. Enter the schedule URL:");
bool ok;
url = QInputDialog::getText(this, "URL Input", format.arg(selectedConf.title()), QLineEdit::Normal, QString(), &ok);
if (!ok) return;
// first save it, to remain if fetch fails
emit changeUrlRequested(selected_id, url);
}
// fetch
importStarted(); // just to show the progress bar
emit haveConferenceUrl(url, selected_id);
}
void ConferenceEditor::importStarted()
{
addBtn->hide();
removeBtn->hide();
buttons->layout()->removeItem(buttonsSpacer);
progressBar->setValue(0);
progressBar->show();
QApplication::processEvents();
}
void ConferenceEditor::showParsingProgress(int progress)
{
progressBar->setValue(progress);
QApplication::processEvents();
}
void ConferenceEditor::importFinished(int conferenceId) {
addBtn->show();
// removeItem should be shown later, but it takes some time,
// and not looks good
// anyway it will be shown a bit later
removeBtn->show();
buttons->layout()->addItem(buttonsSpacer);
progressBar->hide();
QApplication::processEvents();
QModelIndex item = model->indexFromId(conferenceId);
if (item.isValid())
emit wantCurrent(item, QItemSelectionModel::SelectCurrent);
else
itemSelected(QModelIndex(), QModelIndex());
}
confclerk-0.6.0/src/gui/conflictsdialog.ui 0000664 0001750 0001750 00000004225 12156157674 020056 0 ustar gregoa gregoa
ConflictsDialog
0
0
471
373
Dialog
-
Selected Event is in conflict with the following event(s):
true
-
0
1
-
-
Qt::Horizontal
40
20
-
OK
ConflictDialogContainer
QWidget
conflictdialogcontainer.h
1
okButton
clicked()
ConflictsDialog
close()
301
156
175
89
confclerk-0.6.0/src/gui/favtabcontainer.h 0000664 0001750 0001750 00000002162 12156157674 017670 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef FAVTABCONTAINER_H_
#define FAVTABCONTAINER_H_
#include "tabcontainer.h"
class FavTabContainer: public TabContainer
{
Q_OBJECT
public:
FavTabContainer(QWidget *aParent);
virtual ~FavTabContainer(){}
protected:
virtual void loadEvents( const QDate &aDate, const int aConferenceId );
};
#endif /* FAVTABCONTAINER_H_ */
confclerk-0.6.0/src/gui/daynavigatorwidget.ui 0000664 0001750 0001750 00000003111 12156157674 020577 0 ustar gregoa gregoa
DayNavigatorWidget
0
0
31
138
0
0
-
Go to next day (Ctrl+Up)
Ctrl+Up
true
Qt::UpArrow
-
-
Go to previous day (Ctrl+Down)
Ctrl+Down
true
Qt::DownArrow
prevDayButtonClicked()
nextDayButtonClicked()
todayButtonClicked()
confclerk-0.6.0/src/gui/favtabcontainer.cpp 0000664 0001750 0001750 00000002067 12156157674 020227 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "favtabcontainer.h"
FavTabContainer::FavTabContainer(QWidget *aParent) : TabContainer( aParent )
{
}
void FavTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
{
static_cast(treeView->model())->loadFavEvents( aDate, aConferenceId );
}
confclerk-0.6.0/src/gui/settingsdialog.cpp 0000664 0001750 0001750 00000003235 12156157674 020077 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "settingsdialog.h"
#include "appsettings.h"
#include
SettingsDialog::SettingsDialog(QWidget *aParent)
: QDialog(aParent)
{
setupUi(this);
connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool)));
}
void SettingsDialog::loadDialogData()
{
// deserialize dialog data
address->setText(AppSettings::proxyAddress());
port->setValue(AppSettings::proxyPort());
directConnection->setChecked(AppSettings::isDirectConnection());
proxyWidget->setDisabled(directConnection->isChecked());
}
void SettingsDialog::saveDialogData()
{
// serialize dialog data
AppSettings::setProxyAddress(address->text());
AppSettings::setProxyPort(port->value());
AppSettings::setDirectConnection(directConnection->isChecked());
}
void SettingsDialog::connectionTypeChanged(bool aState)
{
proxyWidget->setDisabled(aState);
}
confclerk-0.6.0/src/gui/conferenceeditor.ui 0000664 0001750 0001750 00000017507 12156157674 020237 0 ustar gregoa gregoa
ConferenceEditor
0
0
596
267
Edit Conferences
:/confclerk.svg:/confclerk.svg
-
-
0
-
0
0
:/icons/add.png:/icons/add.png
-
0
0
:/icons/remove.png:/icons/remove.png
-
10
0
0
false
-
Qt::Horizontal
40
20
-
-
-
0
-
75
true
Conference Name
Qt::AlignCenter
true
-
Conference Subtitle
Qt::AlignCenter
true
-
-
75
true
true
When:
-
75
true
true
Where:
-
DATE (FROM - TO)
-
CITY, CAMPUS
-
-
Reload from URL
:/icons/reload.png:/icons/reload.png
-
Change URL
-
Qt::Horizontal
40
20
-
Qt::Vertical
20
40
-
QDialogButtonBox::Close
confclerk-0.6.0/src/gui/searchhead.h 0000664 0001750 0001750 00000002262 12156157674 016612 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef SEARCHHEAD_H
#define SEARCHHEAD_H
#include
#include
#include "ui_searchhead.h"
class SearchHead : public QWidget, public Ui::SearchHeadClass
{
Q_OBJECT
public:
SearchHead(QWidget *parent = 0);
~SearchHead();
signals:
void searchClicked();
private slots:
void searchButtonClicked();
//private:
//Ui::SearchHeadClass ui;
};
#endif // SEARCHHEAD_H
confclerk-0.6.0/src/gui/trackstabcontainer.cpp 0000664 0001750 0001750 00000002110 12156157674 020727 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "trackstabcontainer.h"
TracksTabContainer::TracksTabContainer( QWidget *aParent ) : TabContainer( aParent )
{
}
void TracksTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
{
static_cast(treeView->model())->loadEventsByTrack( aDate, aConferenceId );
}
confclerk-0.6.0/src/gui/daynavigatorwidget.cpp 0000664 0001750 0001750 00000007377 12156157674 020766 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "daynavigatorwidget.h"
#include
#include
DayNavigatorWidget::DayNavigatorWidget(QWidget *aParent): QWidget(aParent) {
setupUi(this);
connect(prevDayButton, SIGNAL(clicked()), SLOT(prevDayButtonClicked()));
connect(nextDayButton, SIGNAL(clicked()), SLOT(nextDayButtonClicked()));
configureNavigation();
}
void DayNavigatorWidget::setDates(const QDate &aStartDate, const QDate &aEndDate) {
Q_ASSERT(aStartDate.isValid() && aEndDate.isValid() && aStartDate<=aEndDate);
mStartDate = aStartDate;
mEndDate = aEndDate;
if (!mCurDate.isValid()) mCurDate = mStartDate;
// if mCurDate is out of range, set it to mstartDate
else if (mCurDate < mStartDate || mCurDate > mEndDate) mCurDate = mStartDate;
configureNavigation();
emit(dateChanged(mCurDate));
this->update();
}
void DayNavigatorWidget::setCurDate(const QDate& curDate) {
Q_ASSERT(curDate.isValid());
if (curDate == mCurDate) return;
if (!mStartDate.isValid()) {
// the start and end date have not been set
mStartDate = curDate;
mEndDate = curDate;
mCurDate = curDate;
}
else if (curDate < mStartDate) mCurDate = mStartDate;
else if (curDate > mEndDate) mCurDate = mEndDate;
else mCurDate = curDate;
configureNavigation();
emit(dateChanged(mCurDate));
this->update();
}
void DayNavigatorWidget::unsetDates() {
mStartDate= QDate();
mEndDate = QDate();
mCurDate = QDate();
configureNavigation();
emit(dateChanged(mCurDate));
this->update();
}
void DayNavigatorWidget::configureNavigation() {
prevDayButton->setDisabled(!mStartDate.isValid() || mCurDate == mStartDate);
nextDayButton->setDisabled(!mEndDate.isValid() || mCurDate == mEndDate);
}
void DayNavigatorWidget::prevDayButtonClicked() {
if(mCurDate <= mStartDate) return;
mCurDate = mCurDate.addDays(-1);
configureNavigation();
emit(dateChanged(mCurDate));
this->update();
}
void DayNavigatorWidget::nextDayButtonClicked() {
if(mCurDate >= mEndDate) return;
mCurDate = mCurDate.addDays(1);
configureNavigation();
emit(dateChanged(mCurDate));
this->update();
}
void DayNavigatorWidget::paintEvent(QPaintEvent *aEvent) {
Q_UNUSED(aEvent);
QString selectedDateStr = mCurDate.isValid() ? mCurDate.toString("dddd\nyyyy-MM-dd") : tr("No date");
QPainter painter(this);
painter.save();
// rectangle only for the text
QRect q(-selectedDate->height()-selectedDate->y(), selectedDate->x(), selectedDate->height(), selectedDate->width());
painter.rotate(270);
// font size adjustion, static on maemo, dynamically otherwise
QFont f = painter.font();
#ifdef MAEMO
qreal factor = 0.8;
#else
qreal factor = (qreal) 2 * q.width() / painter.fontMetrics().width(selectedDateStr);
#endif
if (factor < 1) f.setPointSizeF(f.pointSizeF() * factor);
painter.setFont(f);
painter.drawText(q, Qt::AlignCenter, selectedDateStr);
painter.restore();
}
confclerk-0.6.0/src/gui/conflictsdialog.cpp 0000664 0001750 0001750 00000002457 12156157674 020230 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "conflictsdialog.h"
ConflictsDialog::ConflictsDialog(int aEventId, int aConferenceId, QWidget *aParent)
: QDialog(aParent)
{
setupUi(this);
connect(container, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
connect(container, SIGNAL(eventChanged(int,bool)), container, SLOT(loadEvents()));
container->setEventId(aEventId, aConferenceId);
}
ConflictsDialog::~ConflictsDialog()
{
disconnect(container, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
}
confclerk-0.6.0/src/gui/trackstabcontainer.h 0000664 0001750 0001750 00000002210 12156157674 020375 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef TRACKSTABCONTAINER_H_
#define TRACKSTABCONTAINER_H_
#include "tabcontainer.h"
class TracksTabContainer: public TabContainer
{
Q_OBJECT
public:
TracksTabContainer( QWidget *aParent );
virtual ~TracksTabContainer() {}
protected:
virtual void loadEvents( const QDate &aDate, const int aConferenceId );
};
#endif /* TRACKSTABCONTAINER_H_ */
confclerk-0.6.0/src/gui/settingsdialog.h 0000664 0001750 0001750 00000002262 12156157674 017543 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include
#include "ui_settingsdialog.h"
class SettingsDialog : public QDialog, Ui::SettingsDialog
{
Q_OBJECT
public:
SettingsDialog(QWidget *aParent = NULL);
~SettingsDialog() {}
void loadDialogData();
void saveDialogData();
private slots:
void connectionTypeChanged(bool aState);
};
#endif /* PROXYSETTINGSDIALOG_H */
confclerk-0.6.0/src/gui/conflictdialogcontainer.h 0000664 0001750 0001750 00000002554 12156157674 021413 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef CONFLICTDIALOGCONTAINER_H
#define CONFLICTDIALOGCONTAINER_H
#include "tabcontainer.h"
class ConflictDialogContainer: public TabContainer
{
Q_OBJECT
public:
ConflictDialogContainer(QWidget *aParent);
virtual ~ConflictDialogContainer() {}
public slots:
void setEventId(int aEventId, int conferenceId);
void loadEvents(); // update the conflicts
protected:
virtual void loadEvents(const QDate &aDate, const int aConferenceId); // the date and conference are ignored
private:
int mEventId;
int mConferenceId;
};
#endif /* CONFLICTDIALOGCONTAINER_H */
confclerk-0.6.0/src/gui/conflictsdialog.h 0000664 0001750 0001750 00000002246 12156157674 017671 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef CONFLICTSDIALOG_H
#define CONFLICTSDIALOG_H
#include "ui_conflictsdialog.h"
#include
class ConflictsDialog : public QDialog, Ui::ConflictsDialog
{
Q_OBJECT
public:
ConflictsDialog(int aEventId, int aConferenceId, QWidget *aParent = NULL);
~ConflictsDialog();
signals:
void eventChanged(int aEventId, bool favouriteChanged);
};
#endif /* CONFLICTSDIALOG_H */
confclerk-0.6.0/src/gui/eventdialog.ui 0000664 0001750 0001750 00000005606 12156157674 017217 0 ustar gregoa gregoa
EventDialog
0
0
539
404
0
0
Details
false
-
true
-
-
...
:/icons/alarm-off.png:/icons/alarm-off.png
32
32
CapsLock
-
...
:/icons/favourite-off.png:/icons/favourite-off.png
32
32
-
Qt::Horizontal
40
20
-
OK
okButton
clicked()
EventDialog
close()
287
84
169
53
confclerk-0.6.0/src/gui/tabcontainer.cpp 0000664 0001750 0001750 00000006376 12156157674 017541 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "tabcontainer.h"
#include
#include
#include
#include "treeview.h"
#include "delegate.h"
#include "eventdialog.h"
#include "room.h"
#include "errormessage.h"
#include "conflictsdialog.h"
TabContainer::TabContainer(QWidget *aParent)
: QWidget(aParent)
{
setupUi(this);
treeView->setHeaderHidden(true);
treeView->setRootIsDecorated(false);
treeView->setIndentation(0);
treeView->setAnimated(true);
treeView->setModel(new EventModel());
treeView->setItemDelegate(new Delegate(treeView));
connect(treeView, SIGNAL(eventChanged(int,bool)), SIGNAL(eventChanged(int,bool)));
connect(treeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
connect(treeView, SIGNAL(requestForConflicts(const QModelIndex &)), SLOT(displayConflicts(const QModelIndex &)));
}
void TabContainer::updateTreeView(const QDate &aDate)
{
int active_id = Conference::activeConference();
if (active_id > 0) {
loadEvents(aDate, active_id);
} else {
static_cast(treeView->model())->clearModel();
}
}
void TabContainer::itemClicked(const QModelIndex &aIndex)
{
// have to handle only events, not time-groups
if(!aIndex.parent().isValid()) // time-group
return;
EventDialog dialog(Conference::activeConference(), static_cast(aIndex.internalPointer())->id(),this);
#ifdef N810
dialog.setFixedWidth(static_cast(parent())->width());
#endif
connect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
dialog.exec();
disconnect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
}
void TabContainer::displayConflicts(const QModelIndex &aIndex)
{
Event* event = static_cast(aIndex.internalPointer());
ConflictsDialog dialog(event->id(), event->conferenceId(), this);
#ifdef N810
dialog.setFixedWidth(static_cast(parent())->width());
#endif
connect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
dialog.exec();
disconnect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
}
void TabContainer::redisplayEvent(int aEventId) {
static_cast(treeView->model())->updateModel(aEventId);
}
void TabContainer::redisplayDate(const QDate& curDate) {
updateTreeView(curDate);
}
void TabContainer::clearModel()
{
static_cast(treeView->model())->clearModel();
}
confclerk-0.6.0/src/gui/gui.pro 0000664 0001750 0001750 00000003604 12156157674 015661 0 ustar gregoa gregoa include(../global.pri)
TEMPLATE = lib
TARGET = gui
DESTDIR = ../bin
CONFIG += static
QT += sql \
xml \
network
QMAKE_CLEAN += ../bin/libgui.a
# module dependencies
LIBS += -L$$DESTDIR \
-lmvc \
-lorm \
-lsql
INCLUDEPATH += ../orm \
../mvc \
../sql \
../app
DEPENDPATH += . \
../orm \
../mvc \
../sql
POST_TARGETDEPS += $$DESTDIR/liborm.a \
$$DESTDIR/libmvc.a \
$$DESTDIR/libsql.a
maemo {
LIBS += -L$$DESTDIR \
-lqalarm
INCLUDEPATH += ../alarm
DEPENDPATH += ../alarm
POST_TARGETDEPS += $$DESTDIR/libqalarm.a
}
# A shamelessly long list of sources, headers and forms.
# Please note that resources MUST be added to the app module
# (which means they need to be added to the test module as well,
# but I am sure you can live with that for the time being).
FORMS += searchhead.ui \
mainwindow.ui \
daynavigatorwidget.ui \
about.ui \
eventdialog.ui \
conflictsdialog.ui \
tabcontainer.ui \
settingsdialog.ui \
conferenceeditor.ui \
urlinputdialog.ui
HEADERS += roomstabcontainer.h \
trackstabcontainer.h \
favtabcontainer.h \
searchtabcontainer.h \
searchhead.h \
dayviewtabcontainer.h \
conflictdialogcontainer.h \
conflictsdialog.h \
mainwindow.h \
daynavigatorwidget.h \
eventdialog.h \
tabcontainer.h \
settingsdialog.h \
conferenceeditor.h \
urlinputdialog.h
SOURCES += roomstabcontainer.cpp \
trackstabcontainer.cpp \
favtabcontainer.cpp \
searchtabcontainer.cpp \
searchhead.cpp \
dayviewtabcontainer.cpp \
conflictdialogcontainer.cpp \
conflictsdialog.cpp \
mainwindow.cpp \
daynavigatorwidget.cpp \
eventdialog.cpp \
tabcontainer.cpp \
settingsdialog.cpp \
conferenceeditor.cpp \
urlinputdialog.cpp
HEADERS += errormessage.h
SOURCES += errormessage.cpp
CONFIG(maemo5) {
QT += maemo5
}
confclerk-0.6.0/src/gui/roomstabcontainer.cpp 0000664 0001750 0001750 00000002103 12156157674 020601 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "roomstabcontainer.h"
RoomsTabContainer::RoomsTabContainer( QWidget *aParent ) : TabContainer( aParent )
{
}
void RoomsTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
{
static_cast(treeView->model())->loadEventsByRoom( aDate, aConferenceId );
}
confclerk-0.6.0/src/gui/errormessage.cpp 0000664 0001750 0001750 00000002450 12156157674 017553 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "errormessage.h"
#include
#include
#ifdef QT_MAEMO5_LIB
#include
#else
#include
#endif
void error_message(const QString& message)
{
#ifdef QT_MAEMO5_LIB
// by default the message is white on yellow, which is unusable
// but some html here works
// remove it as soon as they fix the colors
QMaemo5InformationBox::information(0, "" + message + "");
#else
QMessageBox::warning(0, "Error", message);
#endif
}
confclerk-0.6.0/src/gui/tabcontainer.ui 0000664 0001750 0001750 00000002556 12156157674 017370 0 ustar gregoa gregoa
TabContainer
0
0
568
292
0
0
Form
0
-
-
0
1
Qt::ScrollBarAlwaysOn
TreeView
QTreeView
confclerk-0.6.0/src/gui/tabcontainer.h 0000664 0001750 0001750 00000003150 12156157674 017171 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef TABCONTAINER_H
#define TABCONTAINER_H
#include
#include "ui_tabcontainer.h"
#include "conference.h"
#include "sqlengine.h"
#include "conference.h"
#include "eventmodel.h"
class TabContainer : public QWidget, public Ui::TabContainer
{
Q_OBJECT
public:
TabContainer(QWidget *aParent = NULL);
virtual ~TabContainer() {}
void clearModel();
protected:
virtual void loadEvents( const QDate &aDate, const int aConferenceId ) = 0;
signals:
void eventChanged(int aEventId, bool aReloadModel);
public slots:
virtual void redisplayEvent(int aEventId);
void redisplayDate(const QDate& curDate);
protected slots:
virtual void updateTreeView(const QDate &aDate);
void itemClicked(const QModelIndex &aIndex);
void displayConflicts(const QModelIndex &aIndex);
};
#endif /* TABCONTAINER_H */
confclerk-0.6.0/src/gui/settingsdialog.ui 0000664 0001750 0001750 00000006173 12156157674 017736 0 ustar gregoa gregoa
SettingsDialog
0
0
500
152
0
0
500
0
Settings
-
Proxy Settings
-
Direct connection
true
-
-
Address:
-
-
Port:
-
9999
8080
-
Qt::Horizontal
QDialogButtonBox::Cancel|QDialogButtonBox::Ok
buttonBox
accepted()
SettingsDialog
accept()
288
128
325
147
buttonBox
rejected()
SettingsDialog
reject()
202
130
226
147
confclerk-0.6.0/src/gui/dayviewtabcontainer.cpp 0000664 0001750 0001750 00000003715 12156157674 021124 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "dayviewtabcontainer.h"
DayViewTabContainer::DayViewTabContainer(QWidget *aParent): TabContainer(aParent) {
}
void DayViewTabContainer::expandTimeGroup(QTime time, int conferenceId) {
EventModel* eventModel = static_cast(treeView->model());
// iterate over the time groups
for (int g = 0; g != eventModel->rowCount(); ++g) {
QModelIndex groupIdx = eventModel->index(g, 0);
// iterate over the events in the group
for (int e = 0; e != eventModel->rowCount(groupIdx); ++e) {
QModelIndex eventIdx = eventModel->index(e, 0, groupIdx);
int eventId = eventIdx.data().toInt();
Event event = Event::getById(eventId, conferenceId);
if (time < event.start().time().addSecs(event.duration())) { // if time < end
// expand this group
treeView->expand(groupIdx);
treeView->scrollTo(eventIdx, QAbstractItemView::PositionAtTop);
return;
}
}
}
}
void DayViewTabContainer::loadEvents( const QDate &aDate, const int aConferenceId ) {
static_cast(treeView->model())->loadEvents( aDate, aConferenceId );
}
confclerk-0.6.0/src/gui/roomstabcontainer.h 0000664 0001750 0001750 00000002202 12156157674 020246 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef ROOMSTABCONTAINER_H_
#define ROOMSTABCONTAINER_H_
#include "tabcontainer.h"
class RoomsTabContainer: public TabContainer
{
Q_OBJECT
public:
RoomsTabContainer( QWidget *aParent );
virtual ~RoomsTabContainer() {}
protected:
virtual void loadEvents( const QDate &aDate, const int aConferenceId );
};
#endif /* ROOMSTABCONTAINER_H_ */
confclerk-0.6.0/src/gui/searchhead.ui 0000664 0001750 0001750 00000007206 12156157674 017003 0 ustar gregoa gregoa
SearchHeadClass
0
0
371
153
0
0
10
10
SearchHead
-
-
Title
true
-
Abstract
-
Speaker
true
-
-
Tag
-
Room
-
-
true
type a keyword to search
-
0
0
Search
:/icons/search.png:/icons/search.png
false
true
true
false
-
Qt::Vertical
20
20
searchButton
searchEdit
searchTag
searchRoom
confclerk-0.6.0/src/gui/eventdialog.h 0000664 0001750 0001750 00000002522 12156157674 017023 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef EVENTDIALOG_H
#define EVENTDIALOG_H
#include
#include "ui_eventdialog.h"
#include "event.h"
class EventDialog : public QDialog, Ui::EventDialog
{
Q_OBJECT
public:
EventDialog(int conferencdId, int eventId, QWidget *parent = 0);
~EventDialog() {}
private slots:
void favouriteClicked();
void alarmClicked();
signals:
void eventChanged(int aEventId, bool favouriteChanged); // emited when user changes some event details, eg. sets it Favourite
private:
int mConferenceId;
int mEventId;
};
#endif /* EVENTDIALOG_H */
confclerk-0.6.0/src/gui/urlinputdialog.h 0000664 0001750 0001750 00000002415 12156157674 017565 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef URL_INPUT_DIALOG_H
#define URL_INPUT_DIALOG_H
#include "ui_urlinputdialog.h"
class UrlInputDialog : public QDialog, private Ui::UrlInputDialog {
Q_OBJECT
public:
enum {
Cancel,
HaveUrl,
HaveFile
};
UrlInputDialog(QWidget* parent);
virtual ~UrlInputDialog() { }
QString url() { return saved_result; }
private slots:
void acceptClicked();
void rejectClicked();
void openFileClicked();
private:
QString saved_result;
};
#endif
confclerk-0.6.0/src/gui/mainwindow.h 0000664 0001750 0001750 00000005124 12156157674 016677 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include
#include "ui_mainwindow.h"
#include "conferencemodel.h"
class ScheduleXmlParser;
class QNetworkAccessManager;
class QNetworkReply;
class MainWindow : public QMainWindow, private Ui::MainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
signals:
void conferenceRemoved();
private slots:
void on_conferencesAction_triggered();
void on_settingsAction_triggered();
void on_aboutAction_triggered();
void on_reloadAction_triggered();
void on_nowAction_triggered();
void on_searchAction_triggered();
void on_expandAllAction_triggered();
void on_collapseAllAction_triggered();
void onEventChanged(int aEventId, bool favouriteChanged);
void onSearchResultChanged();
void networkQueryFinished(QNetworkReply*);
void importFromNetwork(const QString&, int conferenceId);
void importFromFile(const QString&, int conferenceId);
void removeConference(int);
void changeConferenceUrl(int, const QString&);
void onSystemTrayMessageClicked();
void onAlarmTimerTimeout();
void useConference(int conferenceId);
void unsetConference();
void showError(const QString& message);
private:
void fillAndShowConferenceHeader();
void initTabs(); ///< called on startup and on change of a conference
void clearTabs();
void importData(const QByteArray &aData, const QString& url, int conferenceId);
QString saved_title;
SqlEngine* sqlEngine;
ConferenceModel* conferenceModel;
ScheduleXmlParser *mXmlParser;
QNetworkAccessManager *mNetworkAccessManager;
QSystemTrayIcon* systemTrayIcon; ///< to be able to show notifications
QTimer* alarmTimer; ///< timer that triggers every minute to be able to show alarms
};
#endif /* MAINWINDOW_H */
confclerk-0.6.0/src/gui/mainwindow.ui 0000664 0001750 0001750 00000020666 12156157674 017075 0 ustar gregoa gregoa
MainWindow
0
0
903
498
400
300
ConfClerk
:/confclerk.svg:/confclerk.svg
-
20
0
-
1
Qt::ElideRight
&Favourites
-
&Day
-
&Tracks
-
&Rooms
-
&Search
-
0
0
toolBar
RightToolBarArea
false
C&onferences
Manage Conferences (Ctrl+O)
Ctrl+O
S&ettings
Ctrl+E
&About
&Quit
Quit (Ctrl+Q)
Ctrl+Q
:/icons/reload.png:/icons/reload.png
Reload Conference
Reload Conference (Ctrl+R)
Ctrl+R
:/icons/today.png:/icons/today.png
Jump to now
Jump to now (Ctrl+N)
Ctrl+N
:/icons/search.png:/icons/search.png
&Search
Search (Ctrl+F)
Ctrl+F
:/icons/expand.png:/icons/expand.png
Expand all
Expand all (Ctrl++)
Ctrl++
:/icons/collapse.png:/icons/collapse.png
Collapse all
Collapse all (Ctrl+-)
Ctrl+-
SearchTabContainer
QWidget
DayViewTabContainer
QWidget
FavTabContainer
QWidget
TracksTabContainer
QWidget
RoomsTabContainer
QWidget
DayNavigatorWidget
QWidget
1
quitAction
triggered()
MainWindow
close()
-1
-1
451
248
confclerk-0.6.0/src/gui/mainwindow.cpp 0000664 0001750 0001750 00000040302 12156157674 017227 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "mainwindow.h"
#include
#include
#include
#include
#include
#include "sqlengine.h"
#include "track.h"
#include "eventmodel.h"
#include "delegate.h"
#include "room.h"
#include "conference.h"
#include
#include
#include "ui_about.h"
#include "eventdialog.h"
#include "daynavigatorwidget.h"
#include "settingsdialog.h"
#include "conferenceeditor.h"
#include "schedulexmlparser.h"
#include "errormessage.h"
#include "tabcontainer.h"
#include "appsettings.h"
const QString PROXY_USERNAME;
const QString PROXY_PASSWD;
MainWindow::MainWindow(QWidget* parent): QMainWindow(parent) {
setupUi(this);
// Open database
sqlEngine = new SqlEngine(this);
searchTabContainer->setSqlEngine(sqlEngine);
connect(sqlEngine, SIGNAL(dbError(QString)), this, SLOT(showError(QString)));
sqlEngine->open();
sqlEngine->createOrUpdateDbSchema();
conferenceModel = new ConferenceModel(this);
mXmlParser = new ScheduleXmlParser(sqlEngine, this);
mNetworkAccessManager = new QNetworkAccessManager(this);
systemTrayIcon = new QSystemTrayIcon(qApp->windowIcon(), this);
alarmTimer = new QTimer(this);
alarmTimer->setInterval(60000);
alarmTimer->start();
saved_title = windowTitle();
#ifdef N810
tabWidget->setTabText(1,"Favs");
//tabWidget->setTabText(2,"Day");
#endif
// first time run aplication: -> let's have it direct connection in this case
if(!AppSettings::contains("proxyIsDirectConnection"))
AppSettings::setDirectConnection(true);
QNetworkProxy proxy(
AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
AppSettings::proxyAddress(),
AppSettings::proxyPort(),
PROXY_USERNAME,
PROXY_PASSWD);
QNetworkProxy::setApplicationProxy(proxy);
// event details have changed
connect(dayTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
connect(favsTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
connect(tracksTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
connect(roomsTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
connect(searchTabContainer, SIGNAL(eventChanged(int,bool)), SLOT(onEventChanged(int,bool)));
// date has changed
connect(dayNavigator, SIGNAL(dateChanged(QDate)), dayTabContainer, SLOT(redisplayDate(QDate)));
connect(dayNavigator, SIGNAL(dateChanged(QDate)), favsTabContainer, SLOT(redisplayDate(QDate)));
connect(dayNavigator, SIGNAL(dateChanged(QDate)), tracksTabContainer, SLOT(redisplayDate(QDate)));
connect(dayNavigator, SIGNAL(dateChanged(QDate)), roomsTabContainer, SLOT(redisplayDate(QDate)));
connect(dayNavigator, SIGNAL(dateChanged(QDate)), searchTabContainer, SLOT(redisplayDate(QDate)));
// search result has changed
connect(searchTabContainer, SIGNAL(searchResultChanged()), SLOT(onSearchResultChanged()));
// systm tray icon
connect(systemTrayIcon, SIGNAL(messageClicked()), SLOT(onSystemTrayMessageClicked()));
connect(systemTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), SLOT(onSystemTrayMessageClicked()));
// timer
connect(alarmTimer, SIGNAL(timeout()), SLOT(onAlarmTimerTimeout()));
// add the actions from the main menu to the window, otherwise the shortcuts don't work on MAEMO
addAction(conferencesAction);
addAction(settingsAction);
addAction(quitAction);
// open conference
useConference(Conference::activeConference());
// optimization, see useConference() code
try {
initTabs();
} catch (const OrmException& e) {
qDebug() << "OrmException:" << e.text();
clearTabs();
}
connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), SLOT(networkQueryFinished(QNetworkReply*)));
connect(mXmlParser, SIGNAL(parsingScheduleBegin()), conferenceModel, SLOT(newConferenceBegin()));
connect(mXmlParser, SIGNAL(parsingScheduleEnd(int)), conferenceModel, SLOT(newConferenceEnd(int)));
}
MainWindow::~MainWindow() {
sqlEngine->close();
}
void MainWindow::on_aboutAction_triggered()
{
QDialog dialog(this);
Ui::AboutDialog ui;
ui.setupUi(&dialog);
ui.labDescription->setText(ui.labDescription->text().arg(qApp->applicationVersion()));
#ifdef N810
dialog.setFixedWidth(width());
#endif
dialog.exec();
}
void MainWindow::on_reloadAction_triggered() {
int confId = Conference::activeConference();
if (confId== -1) return;
Conference active = Conference::getById(confId);
if (active.url().isEmpty()) return;
importFromNetwork(active.url(), confId);
setEnabled(false);
}
void MainWindow::on_nowAction_triggered() {
int confId = Conference::activeConference();
if (confId== -1) return;
dayNavigator->setCurDate(QDate::currentDate());
dayTabContainer->expandTimeGroup(QTime::currentTime(), confId);
}
void MainWindow::on_searchAction_triggered() {
if (tabWidget->currentWidget() == searchTab)
searchTabContainer->showSearchDialog(!searchTabContainer->searchDialogIsVisible());
else {
tabWidget->setCurrentWidget(searchTab);
searchTabContainer->showSearchDialog();
}
}
void MainWindow::on_expandAllAction_triggered() {
if (tabWidget->currentWidget() == favouritesTab) favsTabContainer->treeView->expandAll();
if (tabWidget->currentWidget() == dayViewTab) dayTabContainer->treeView->expandAll();
if (tabWidget->currentWidget() == tracksTab) tracksTabContainer->treeView->expandAll();
if (tabWidget->currentWidget() == roomsTab) roomsTabContainer->treeView->expandAll();
if (tabWidget->currentWidget() == searchTab) searchTabContainer->treeView->expandAll();
}
void MainWindow::on_collapseAllAction_triggered() {
if (tabWidget->currentWidget() == favouritesTab) favsTabContainer->treeView->collapseAll();
if (tabWidget->currentWidget() == dayViewTab) dayTabContainer->treeView->collapseAll();
if (tabWidget->currentWidget() == tracksTab) tracksTabContainer->treeView->collapseAll();
if (tabWidget->currentWidget() == roomsTab) roomsTabContainer->treeView->collapseAll();
if (tabWidget->currentWidget() == searchTab) searchTabContainer->treeView->collapseAll();
}
void MainWindow::onEventChanged(int aEventId, bool favouriteChanged) {
dayTabContainer->redisplayEvent(aEventId);
if (favouriteChanged) favsTabContainer->redisplayDate(dayNavigator->curDate());
else favsTabContainer->redisplayEvent(aEventId);
tracksTabContainer->redisplayEvent(aEventId);
roomsTabContainer->redisplayEvent(aEventId);
searchTabContainer->redisplayEvent(aEventId);
}
void MainWindow::onSearchResultChanged() {
// Are results found on the current date?
QDate date = dayNavigator->curDate();
int count = searchTabContainer->searchResultCount(date);
if (count > 0) {searchTabContainer->redisplayDate(date); return;}
// Are results found in the future?
for (date = date.addDays(1); date <= dayNavigator->endDate(); date = date.addDays(1)) {
int count = searchTabContainer->searchResultCount(date);
if (count > 0) {dayNavigator->setCurDate(date); return;}
}
// Are results found in the past?
for (date = dayNavigator->startDate(); date < dayNavigator->curDate(); date = date.addDays(1)) {
int count = searchTabContainer->searchResultCount(date);
if (count > 0) {dayNavigator->setCurDate(date); return;}
}
// No results were found
searchTabContainer->redisplayDate(dayNavigator->curDate());
}
void MainWindow::onSystemTrayMessageClicked() {
systemTrayIcon->hide();
}
void MainWindow::onAlarmTimerTimeout() {
// determine if an alarm is set on an event that's starting soon
QList events = Event::getImminentAlarmEvents(AppSettings::preEventAlarmSec(), Conference::activeConference());
if (events.empty()) return;
// build a message string
Event event;
QString title;
QString message;
if (events.size() == 1) {
event = events.first();
title = tr("Next event at %1").arg(event.start().toString("HH:mm"));
message = tr("\"%1\"\n(%2)").arg(event.title()).arg(event.room()->name());
} else {
title = tr("%1 upcoming events").arg(events.size());
QStringList messages;
foreach (event, events) {
messages += tr("%1: \"%2\" (%3)").arg(event.start().toString("HH:mm")).arg(event.title()).arg(event.room()->name());
}
message = messages.join("\n");
}
// and delete the corresponding alarm
foreach (event, events) {
event.setHasAlarm(false);
event.update("alarm");
onEventChanged(event.id(), false);
}
// show message
systemTrayIcon->show();
// The next two lines are to prevent a very strange position of the message box the first time at X11/aweseome (not Win32/XP)
systemTrayIcon->showMessage("ConfClerk", "Your upcoming events", QSystemTrayIcon::Information);
qApp->processEvents();
systemTrayIcon->showMessage(title, message, QSystemTrayIcon::Information, 60*60*24*1000);
QApplication::alert(this);
QApplication::beep();
}
void MainWindow::useConference(int conferenceId)
{
if (conferenceId == -1) // in case no conference is active
{
unsetConference();
return;
}
try {
int oldActiveConferenceId = Conference::activeConference();
bool switchActiveConference = conferenceId != oldActiveConferenceId;
if (switchActiveConference) Conference::getById(oldActiveConferenceId).update("active", 0);
Conference activeConference = Conference::getById(conferenceId);
if (switchActiveConference) activeConference.update("active",1);
// looks like it does not work at n900
setWindowTitle(activeConference.title());
// optimization.
// dont run initTabs() here
// it takes much CPU, making travelling between conferences in ConferenceEditor longer
// and is not seen in maemo WM anyway
// instead run it explicitly
// 1. at startup
// 2. when ConferenceEditor finished
// dont forget to protect the calls by try-catch!
// just in case, clear conference selection instead
clearTabs();
// end of optimization
// initTabs();
} catch (OrmException& e) {
// cannon set an active conference
unsetConference(); // TODO: as no active conference is now correctly managed this should be handled as a fatal error
return;
}
}
void MainWindow::initTabs()
{
int confId = Conference::activeConference();
if (confId != -1) // only init tabs if a conference is active
{
Conference active = Conference::getById(confId);
QDate startDate = active.start();
QDate endDate = active.end();
// 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates
dayNavigator->setDates(startDate, endDate);
nowAction->trigger();
}
}
void MainWindow::clearTabs()
{
dayTabContainer->clearModel();
tracksTabContainer->clearModel();
roomsTabContainer->clearModel();
favsTabContainer->clearModel();
searchTabContainer->clearModel();
}
void MainWindow::unsetConference()
{
clearTabs();
dayNavigator->unsetDates();
setWindowTitle(saved_title);
}
void MainWindow::showError(const QString& message) {
error_message(message);
}
void MainWindow::on_settingsAction_triggered()
{
SettingsDialog dialog;
dialog.loadDialogData();
if (dialog.exec() == QDialog::Accepted) {
dialog.saveDialogData();
QNetworkProxy proxy(
AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
AppSettings::proxyAddress(),
AppSettings::proxyPort(),
PROXY_USERNAME,
PROXY_PASSWD);
QNetworkProxy::setApplicationProxy(proxy);
}
}
/** Create and run ConferenceEditor dialog, making required connections for it.
This method manages, which classes actually perform changes in conference list.
There are several classes that modify the conferences:
this:
deletion and URL update.
this, mXmlParser and mNetworkAccessManager:
addition and refresh.
*/
void MainWindow::on_conferencesAction_triggered()
{
ConferenceEditor dialog(conferenceModel, this);
connect(&dialog, SIGNAL(haveConferenceUrl(const QString&, int)), SLOT(importFromNetwork(const QString&, int)));
connect(&dialog, SIGNAL(haveConferenceFile(const QString&, int)), SLOT(importFromFile(const QString&, int)));
connect(&dialog, SIGNAL(removeConferenceRequested(int)), SLOT(removeConference(int)));
connect(&dialog, SIGNAL(changeUrlRequested(int, const QString&)),
SLOT(changeConferenceUrl(int, const QString&)));
connect(&dialog, SIGNAL(haveConferenceSelected(int)), SLOT(useConference(int)));
connect(&dialog, SIGNAL(noneConferenceSelected()), SLOT(unsetConference()));
connect(mXmlParser, SIGNAL(parsingScheduleBegin()), &dialog, SLOT(importStarted()));
connect(mXmlParser, SIGNAL(progressStatus(int)), &dialog, SLOT(showParsingProgress(int)));
connect(mXmlParser, SIGNAL(parsingScheduleEnd(int)), &dialog, SLOT(importFinished(int)));
connect(this, SIGNAL(conferenceRemoved()), &dialog, SLOT(conferenceRemoved()));
dialog.exec();
// optimization, see useConference() code
try {
initTabs();
} catch (OrmException) {
clearTabs();
}
}
void MainWindow::networkQueryFinished(QNetworkReply *aReply) {
if (aReply->error() != QNetworkReply::NoError) {
error_message(QString("Error occured during download: ") + aReply->errorString());
} else {
QUrl redirectUrl = aReply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
if (!redirectUrl.isEmpty()) {
if (redirectUrl != aReply->request().url()) {
importFromNetwork(redirectUrl.toString(), aReply->request().attribute(QNetworkRequest::User).toInt());
return; // don't enable controls
} else {
error_message(QString("Error: Cyclic redirection from %1 to itself.").arg(redirectUrl.toString()));
}
} else {
importData(aReply->readAll(), aReply->url().toEncoded(), aReply->request().attribute(QNetworkRequest::User).toInt());
}
}
setEnabled(true);
}
void MainWindow::importData(const QByteArray &aData, const QString& url, int conferenceId)
{
mXmlParser->parseData(aData, url, conferenceId);
}
void MainWindow::importFromNetwork(const QString& url, int conferenceId)
{
QNetworkRequest request;
request.setUrl(QUrl(url));
request.setAttribute(QNetworkRequest::User, conferenceId);
mNetworkAccessManager->setProxy(QNetworkProxy::applicationProxy());
mNetworkAccessManager->get(request);
}
void MainWindow::importFromFile(const QString& filename, int conferenceId)
{
QFile file(filename);
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
static const QString format("Cannot read \"%1\": error %2");
error_message(format.arg(filename, QString::number(file.error())));
}
importData(file.readAll(), "", conferenceId);
}
void MainWindow::removeConference(int id) {
sqlEngine->deleteConference(id);
conferenceModel->conferenceRemoved();
emit conferenceRemoved();
}
void MainWindow::changeConferenceUrl(int id, const QString& url) {
Conference::getById(id).setUrl(url);
}
confclerk-0.6.0/src/gui/daynavigatorwidget.h 0000664 0001750 0001750 00000003773 12156157674 020427 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef DAYNAVIGATORWIDGET_H
#define DAYNAVIGATORWIDGET_H
#include "ui_daynavigatorwidget.h"
#include
#include
/** The DayNavigator widget manages three dates, the startDate, curDate and endDate.
Either startDate, curDate and endDate all have to be valid and startDate <= curDate <= endDate,
OR all three dates are invalid (representing "no date range", e.g. no conference). */
class DayNavigatorWidget : public QWidget, private Ui::DayNavigatorWidget {
Q_OBJECT
public:
DayNavigatorWidget(QWidget *aParent = NULL);
~DayNavigatorWidget() {}
void setDates(const QDate &aStartDate, const QDate &aEndDate);
void setCurDate(const QDate& curDate);
QDate startDate() const {return mStartDate;}
QDate curDate() const {return mCurDate;}
QDate endDate() const {return mEndDate;}
void unsetDates();
protected:
void paintEvent(QPaintEvent *);
void configureNavigation();
private slots:
void prevDayButtonClicked();
void nextDayButtonClicked();
signals:
void dateChanged(const QDate &aDate);
private:
QDate mStartDate;
QDate mEndDate;
QDate mCurDate;
};
#endif /* DAYNAVIGATORWIDGET_H */
confclerk-0.6.0/src/gui/searchtabcontainer.h 0000664 0001750 0001750 00000003215 12156157674 020361 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef SEARCHTAB_H_
#define SEARCHTAB_H_
#include
#include "tabcontainer.h"
#include "searchhead.h"
#include "sqlengine.h"
class SearchTabContainer: public TabContainer {
Q_OBJECT
private:
SqlEngine* sqlEngine;
public:
SearchTabContainer(QWidget *aParent);
virtual ~SearchTabContainer() {}
void setSqlEngine(SqlEngine* sqlEngine) {this->sqlEngine = sqlEngine;}
bool searchDialogIsVisible() const;
int searchResultCount(const QDate& date) const; ///< returns the number of events found on that specific date
protected:
virtual void loadEvents( const QDate &aDate, const int aConferenceId );
signals:
void searchResultChanged();
public slots:
void showSearchDialog(bool show=true);
private slots:
void searchButtonClicked();
private:
SearchHead *header;
QToolButton *searchAgainButton;
};
#endif /* SEARCHTAB_H_ */
confclerk-0.6.0/src/gui/about.ui 0000664 0001750 0001750 00000021354 12156157674 016026 0 ustar gregoa gregoa
AboutDialog
Qt::WindowModal
0
0
460
570
0
0
77
77
500
1000
239
235
231
239
235
231
239
235
231
239
235
231
255
255
255
239
235
231
About application
-
Qt::ScrollBarAlwaysOff
true
0
0
438
517
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:8pt; font-weight:400; font-style:normal;">
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/confclerk.svg" width="77" style="float: right;" /></p>
<p style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:xx-large; font-weight:600;">ConfClerk</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Successor of FOSDEM schedule<br /></span>Version %1</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.toastfreeware.priv.at/confclerk/"><span style=" text-decoration: underline; color:#0057ae;">http://www.toastfreeware.priv.at/confclerk/</span></a></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">ConfClerk is an application written in Qt, which makes conference schedules available offline. It displays the conference schedule from various views, supports searches on various items (speaker, speech topic, location, etc.) and enables you to select favorite events and create your own schedule. At the moment ConfClerk is able to import schedules in XML format created by the PentaBarf conference management system used by e.g. FOSDEM, DebConf, FrOSCon, and the CCC.</p>
<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:x-large; font-weight:600;">Developers</span></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Berendova Monika, Hanzes Matus, Komara Martin, Korinek Pavol, Pavelka Pavol, Timko Marek, Uzak Matus, Fortes Francisco, Philipp Spitzer, gregor herrmann</p>
<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:x-large; font-weight:600;">Copyright and license</span></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">ConfClerk is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.</p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">ConfClerk is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright (C) 2010 Ixonos Plc.<br />Copyright (C) 2011-2013 Philipp Spitzer & gregor herrmann</p></body></html>
Qt::RichText
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
true
true
Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
-
-
Qt::Horizontal
40
20
-
OK
okButton
clicked()
AboutDialog
close()
512
724
282
375
confclerk-0.6.0/src/gui/eventdialog.cpp 0000664 0001750 0001750 00000011334 12156157674 017357 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "eventdialog.h"
#include "conference.h"
#include
#ifdef MAEMO
#include "alarm.h"
#include "appsettings.h"
#endif
EventDialog::EventDialog(int conferenceId, int eventId, QWidget *parent): QDialog(parent), mConferenceId(conferenceId), mEventId(eventId) {
setupUi(this);
#ifdef MAEMO
showFullScreen();
#endif
Event event = Event::getById(mEventId, mConferenceId);
QString info;
// title
info.append(QString("%1
\n").arg(event.title()));
// persons
info += QString("%1
\n").arg(tr("Persons"));
info += QString("%1
\n").arg(event.persons().join(", "));
// abstract
info += QString("%1
\n").arg(tr("Abstract"));
info += QString("%1
\n").arg(event.abstract());
// description
info += QString("%1
\n").arg(tr("Description"));
info += QString("%1
\n").arg(event.description());
// links
info += QString("%1
\n\n").arg(tr("Links"));
QMapIterator i(event.links());
while (i.hasNext()) {
i.next();
QString url(i.value());
QString name(i.key());
if (url.isEmpty() || url == "http://") continue;
if (name.isEmpty()) name = url;
info += QString("- %2
\n").arg(url, name);
}
info += QString("
\n");
eventInfoTextBrowser->setHtml(info);
// make sure colours are the same as usual
eventInfoTextBrowser->setPalette(qApp->palette());
// reduce font size, on maemo
#ifdef MAEMO
QFont font = eventInfoTextBrowser->font();
font.setPointSizeF(font.pointSizeF()*0.8);
eventInfoTextBrowser->setFont(font);
#endif
connect(favouriteButton, SIGNAL(clicked()), SLOT(favouriteClicked()));
connect(alarmButton, SIGNAL(clicked()), SLOT(alarmClicked()));
if(event.isFavourite())
{
favouriteButton->setIcon(QIcon(":/icons/favourite-on.png"));
}
if(event.hasAlarm())
{
alarmButton->setIcon(QIcon(":/icons/alarm-on.png"));
}
}
void EventDialog::favouriteClicked()
{
Event event = Event::getById(mEventId, mConferenceId);
QList conflicts = Event::conflictEvents(event.id(), mConferenceId);
if(event.isFavourite())
{
event.setFavourite(false);
favouriteButton->setIcon(QIcon(":/icons/favourite-off.png"));
}
else
{
event.setFavourite(true);
favouriteButton->setIcon(QIcon(":/icons/favourite-on.png"));
}
event.update("favourite");
if(event.isFavourite())
{
// event has became 'favourite' and so 'conflicts' list may have changed
conflicts = Event::conflictEvents(event.id(), mConferenceId);
}
// have to emit 'eventChanged' signal on all events in conflict
for(int i=0; isetIcon(QIcon(":/icons/alarm-off.png"));
#ifdef MAEMO
// remove alarm from the 'alarmd' alarms list
Alarm alarm;
alarm.deleteAlarm(event.conferenceId(), event.id());
// TODO: test if removing was successfull
#endif /* MAEMO */
}
else
{
event.setHasAlarm(true);
alarmButton->setIcon(QIcon(":/icons/alarm-on.png"));
#ifdef MAEMO
// add alarm to the 'alarmd'
Alarm alarm;
alarm.addAlarm(event.conferenceId(), event.id(), event.title(), event.start().addSecs(-AppSettings::preEventAlarmSec()));
#endif /* MAEMO */
}
event.update("alarm");
// since the Alarm icon has changed, update TreeView accordingly
// all TreeViews have to listen on this signal
emit eventChanged(event.id(), false);
}
confclerk-0.6.0/src/gui/conferenceeditor.h 0000664 0001750 0001750 00000004550 12156157674 020043 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef CONFERENCE_EDITOR_H
#define CONFERENCE_EDITOR_H
#include "ui_conferenceeditor.h"
#include
class ConferenceModel;
/** ConferenceEditor clas is used for managing list of conferences.
That is, selecting an active conference, adding a new conference from URL or
file, removing a conference, refreshing a conference from URL that is saved in
the DB.
It does not do anything of this itself, instead emitting controlling signals.
On the ConferenceEditor creation, they are connected to proper listeners.
\see MainWindow::showConferences()
*/
class ConferenceEditor : public QDialog, private Ui::ConferenceEditor {
Q_OBJECT
public:
ConferenceEditor(ConferenceModel* model, QWidget* parent);
virtual ~ConferenceEditor() { }
signals:
void haveConferenceSelected(int id);
void noneConferenceSelected();
void haveConferenceUrl(const QString& url, int conferenceId);
void haveConferenceFile(const QString& path, int conferenceId);
void removeConferenceRequested(int id);
void changeUrlRequested(int, const QString&);
void wantCurrent(const QModelIndex&, QItemSelectionModel::SelectionFlags);
public slots:
void importStarted();
void importFinished(int conferenceId);
void conferenceRemoved();
void showParsingProgress(int);
private slots:
void itemSelected(const QModelIndex& current, const QModelIndex& previous);
void addClicked();
void removeClicked();
void changeUrlClicked();
void refreshClicked();
private:
ConferenceModel* model;
int selected_id;
QString import_in_progress_title;
};
#endif
confclerk-0.6.0/src/gui/urlinputdialog.ui 0000664 0001750 0001750 00000003266 12156157674 017760 0 ustar gregoa gregoa
UrlInputDialog
0
0
URL Input
-
Enter schedule URL
-
-
Qt::Horizontal
QDialogButtonBox::Cancel|QDialogButtonBox::Open
buttons
accepted()
UrlInputDialog
accept()
248
254
157
274
buttons
rejected()
UrlInputDialog
reject()
316
260
286
274
confclerk-0.6.0/src/gui/errormessage.h 0000664 0001750 0001750 00000001620 12156157674 017216 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#ifndef ERRORMESSAGE_H
#define ERRORMESSAGE_H
#include
void error_message(const QString& message);
#endif
confclerk-0.6.0/src/gui/searchtabcontainer.cpp 0000664 0001750 0001750 00000007321 12156157674 020716 0 ustar gregoa gregoa /*
* Copyright (C) 2010 Ixonos Plc.
* Copyright (C) 2011-2013 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
* ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
* ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* ConfClerk. If not, see .
*/
#include "searchtabcontainer.h"
#include "searchhead.h"
#include
SearchTabContainer::SearchTabContainer(QWidget *aParent): TabContainer(aParent), sqlEngine(0) {
header = new SearchHead(this);
header->setObjectName(QString::fromUtf8("header"));
QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
//sizePolicy.setHeightForWidth(TabContainer::sizePolicy().hasHeightForWidth());
sizePolicy.setHeightForWidth(header->sizePolicy().hasHeightForWidth());
header->setSizePolicy(sizePolicy);
header->setMinimumSize(QSize(10, 10));
verticalLayout->insertWidget(0,header);
connect(header, SIGNAL(searchClicked()), SLOT(searchButtonClicked()));
showSearchDialog();
}
bool SearchTabContainer::searchDialogIsVisible() const {
return header->isVisible();
}
int SearchTabContainer::searchResultCount(const QDate& date) const {
int confId = Conference::activeConference();
if (confId == -1) return 0;
return Event::getSearchResultByDate(date, confId, "start, duration").count();
}
void SearchTabContainer::showSearchDialog(bool show) {
header->setVisible(show);
treeView->setVisible(!show);
if (show) header->searchEdit->setFocus(Qt::OtherFocusReason);
}
void SearchTabContainer::searchButtonClicked() {
if (!sqlEngine) return;
QHash columns;
SearchHead *searchHeader = static_cast(header);
if( searchHeader->searchTitle->isChecked() )
columns.insertMulti("EVENT", "title");
if( searchHeader->searchAbstract->isChecked() )
columns.insertMulti("EVENT", "abstract");
if( searchHeader->searchTag->isChecked() )
columns.insertMulti("EVENT", "tag");
if( searchHeader->searchSpeaker->isChecked() )
columns["PERSON"] = "name";
if( searchHeader->searchRoom->isChecked() )
columns["ROOM"] = "name";
QString keyword = searchHeader->searchEdit->text();
int confId = Conference::activeConference();
if (confId == -1) return;
Conference conf = Conference::getById(confId);
sqlEngine->searchEvent( confId, columns, keyword );
int nrofFounds = 0;
for (QDate d = conf.start(); d <= conf.end(); d = d.addDays(1))
nrofFounds += Event::getSearchResultByDate(d, confId, "start, duration").count();
if (!nrofFounds) {
treeView->hide();
header->show();
QMessageBox::information(
this,
QString("Keyword '%1' not found!").arg(keyword),
QString("No events containing '%1' found!").arg(keyword),
QMessageBox::Ok);
} else {
treeView->show();
header->hide();
emit searchResultChanged();
}
}
void SearchTabContainer::loadEvents( const QDate &aDate, const int aConferenceId )
{
static_cast(treeView->model())->loadSearchResultEvents( aDate, aConferenceId );
}
confclerk-0.6.0/src/icons/ 0000775 0001750 0001750 00000000000 12156157674 014677 5 ustar gregoa gregoa confclerk-0.6.0/src/icons/collapse.png 0000664 0001750 0001750 00000000701 12156157674 017205 0 ustar gregoa gregoa PNG
IHDR szz sBIT|d pHYs
B(x tEXtSoftware www.inkscape.org< >IDATX?j`\jk*C7E@f l*Gz+ALUO||0y$0ȲL8UU(
c\7/xXUp\4M_QQCq=$YX<^zP<<p
FTd mҹPUC E5 Gc ; I0 \P9p]wZwSsa/at~w1VY.ˍC dVK
+
jҿߚݴ]B IENDB` confclerk-0.6.0/src/icons/dialog-warning.png 0000644 0001750 0001750 00000003270 12156157674 020307 0 ustar gregoa gregoa PNG
IHDR szz sBIT|d pHYs
B(x tEXtSoftware www.inkscape.org< 5IDATXõkWg̼{.PݪИ|kZ,jZ1*RC?TSb#4?xI&oJlmZ`([vey/3s.~xwe$O3ϜIfr7V8`]#}l\z9|B%{<^~#uVwTynj%w`pKvo58=jpJ~aR9Kl;0
[WS]K4CwKrR0
2?x-k^@%+Ȟ<"zXG̾ٝ-r=<$&{_OV8XG`$t?OuxV yLy
n nhLi
5N_:e}N4iYw`.܍lE2:NzIKD۲${