File indexing completed on 2024-04-28 05:42:03
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2009 by Rajko Albrecht * 0003 * ral@alwins-world.de * 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 * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0019 ***************************************************************************/ 0020 #ifndef STOPDLG_H 0021 #define STOPDLG_H 0022 0023 #include "svnfrontend/fronthelpers/cursorstack.h" 0024 0025 #include <QDialog> 0026 #include <QElapsedTimer> 0027 0028 class QDialogButtonBox; 0029 class QTimer; 0030 class QLabel; 0031 class QProgressBar; 0032 class QTextBrowser; 0033 class QHideEvent; 0034 class QShowEvent; 0035 class QVBoxLayout; 0036 class CContextListener; 0037 0038 /** 0039 @author Rajko Albrecht 0040 */ 0041 class StopDlg : public QDialog 0042 { 0043 Q_OBJECT 0044 public: 0045 StopDlg(CContextListener *listener, QWidget *parent, const QString &caption, const QString &text); 0046 ~StopDlg() override; 0047 0048 protected: 0049 int m_MinDuration; 0050 bool mCancelled; 0051 QTimer *mShowTimer; 0052 bool mShown, mWait; 0053 QLabel *mLabel; 0054 QProgressBar *m_ProgressBar; 0055 QProgressBar *m_NetBar; 0056 bool m_BarShown; 0057 bool m_netBarShown; 0058 QElapsedTimer m_StopTick; 0059 QTextBrowser *m_LogWindow; 0060 QVBoxLayout *layout, *mainLayout; 0061 0062 QString m_lastLog; 0063 unsigned int m_lastLogLines; 0064 CursorStack *cstack; 0065 QDialogButtonBox *m_bBox; 0066 0067 void showEvent(QShowEvent *e) override; 0068 void hideEvent(QHideEvent *e) override; 0069 0070 public slots: 0071 virtual void slotTick(); 0072 virtual void slotWait(bool); 0073 virtual void slotExtraMessage(const QString &); 0074 0075 protected slots: 0076 virtual void slotAutoShow(); 0077 virtual void slotCancel(); 0078 virtual void slotNetProgres(long long int, long long int); 0079 signals: 0080 void sigCancel(bool how); 0081 }; 0082 0083 #endif