File indexing completed on 2024-11-24 04:48:39
0001 /* 0002 * Copyright (C) 2009 by Thorsten Staerk and Mathias Soeken <msoeken@tzi.de> 0003 * Copyright (C) 2019 Alexander Potashev <aspotashev@gmail.com> 0004 * 0005 * This program is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU General Public License as published by 0007 * the Free Software Foundation; either version 2 of the License, or 0008 * (at your option) any later version. 0009 * 0010 * This program is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU General Public License along 0016 * with this program; if not, write to the 0017 * Free Software Foundation, Inc. 0018 * 51 Franklin Street, Fifth Floor 0019 * Boston, MA 02110-1301 USA. 0020 * 0021 */ 0022 0023 #ifndef HISTORYDIALOG_H 0024 #define HISTORYDIALOG_H 0025 0026 #include <QDialog> 0027 0028 #include "ui_historydialog.h" 0029 0030 class ProjectModel; 0031 0032 class HistoryDialog : public QDialog 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 explicit HistoryDialog(QWidget *parent, ProjectModel *projectModel); 0038 ~HistoryDialog() override = default; 0039 0040 static const QString dateTimeFormat; 0041 0042 protected: 0043 void changeEvent(QEvent *e) override; 0044 0045 private Q_SLOTS: 0046 /** 0047 * The historywidget contains all events and can be shown with File | Edit History. 0048 * The user can change dates and comments in there. 0049 * A change triggers this procedure, it shall store the new values in the calendar. 0050 */ 0051 void onCellChanged(int row, int col); 0052 0053 void onDeleteClicked(); 0054 void on_buttonbox_rejected(); 0055 0056 private: 0057 QString listAllEvents(); 0058 QString refresh(); 0059 0060 ProjectModel *m_projectModel; 0061 Ui::HistoryDialog m_ui; 0062 }; 0063 0064 #endif // HISTORYDIALOG_H