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