[b431d47] | 1 | /* |
---|
| 2 | * Copyright (C) 2010 Ixonos Plc. |
---|
| 3 | * |
---|
| 4 | * This file is part of fosdem-schedule. |
---|
| 5 | * |
---|
| 6 | * fosdem-schedule is free software: you can redistribute it and/or modify it |
---|
| 7 | * under the terms of the GNU General Public License as published by the Free |
---|
| 8 | * Software Foundation, either version 2 of the License, or (at your option) |
---|
| 9 | * any later version. |
---|
| 10 | * |
---|
| 11 | * fosdem-schedule is distributed in the hope that it will be useful, but |
---|
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
---|
| 13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
---|
| 14 | * more details. |
---|
| 15 | * |
---|
| 16 | * You should have received a copy of the GNU General Public License along with |
---|
| 17 | * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>. |
---|
| 18 | */ |
---|
| 19 | #ifndef CONFERENCE_EDITOR_H |
---|
| 20 | #define CONFERENCE_EDITOR_H |
---|
| 21 | |
---|
| 22 | #include "ui_conferenceeditor.h" |
---|
| 23 | |
---|
| 24 | #include <QItemSelectionModel> |
---|
| 25 | |
---|
| 26 | class ConferenceModel; |
---|
| 27 | |
---|
| 28 | /** ConferenceEditor clas is used for managing list of conferences. |
---|
| 29 | |
---|
| 30 | That is, selecting an active conference, adding a new conference from URL or |
---|
| 31 | file, removing a conference, refreshing a conference from URL that is saved in |
---|
| 32 | the DB. |
---|
| 33 | |
---|
| 34 | It does not do anything of this itself, instead emitting controlling signals. |
---|
| 35 | On the ConferenceEditor creation, they are connected to proper listeners. |
---|
| 36 | |
---|
| 37 | \see MainWindow::showConferences() |
---|
| 38 | */ |
---|
| 39 | class ConferenceEditor : public QDialog, private Ui::ConferenceEditor { |
---|
| 40 | Q_OBJECT |
---|
| 41 | |
---|
| 42 | public: |
---|
| 43 | ConferenceEditor(ConferenceModel* model, QWidget* parent); |
---|
| 44 | virtual ~ConferenceEditor() { } |
---|
| 45 | signals: |
---|
| 46 | void haveConferenceSelected(int id); |
---|
| 47 | void noneConferenceSelected(); |
---|
| 48 | |
---|
| 49 | void haveConferenceUrl(const QString& url); |
---|
| 50 | void haveConferenceFile(const QString& path); |
---|
| 51 | void removeConferenceRequested(int id); |
---|
| 52 | void changeUrlRequested(int, const QString&); |
---|
| 53 | |
---|
| 54 | void wantCurrent(const QModelIndex&, QItemSelectionModel::SelectionFlags); |
---|
| 55 | public slots: |
---|
| 56 | void importStarted(); |
---|
| 57 | void importFinished(const QString& title); |
---|
| 58 | void conferenceRemoved(); |
---|
| 59 | void showParsingProgress(int); |
---|
| 60 | private slots: |
---|
| 61 | void itemSelected(const QModelIndex& current, const QModelIndex& previous); |
---|
| 62 | void addClicked(); |
---|
| 63 | void removeClicked(); |
---|
| 64 | void changeUrlClicked(); |
---|
| 65 | void refreshClicked(); |
---|
[cb7b999] | 66 | void conferenceMapClicked(); |
---|
[b431d47] | 67 | |
---|
| 68 | private: |
---|
| 69 | ConferenceModel* model; |
---|
| 70 | int selected_id; |
---|
| 71 | QString import_in_progress_title; |
---|
| 72 | }; |
---|
| 73 | |
---|
| 74 | #endif |
---|