commitdlg.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 1999, 2000 by Bernd Gehrmann * 00003 * bernd@kdevelop.org * 00004 * Modified for perforce 2002 by Harald Fernengel <harry@kdevelop.org> * 00005 * * 00006 * This program is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 2 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 ***************************************************************************/ 00012 00013 #ifndef _COMMITDIALOG_H_ 00014 #define _COMMITDIALOG_H_ 00015 00016 #include <qstringlist.h> 00017 #include <qtextedit.h> 00018 #include <klineedit.h> 00019 #include <klistbox.h> 00020 #include <kdialogbase.h> 00021 00022 class KProcess; 00023 00024 class CommitDialog : public KDialogBase 00025 { 00026 Q_OBJECT 00027 public: 00028 CommitDialog( QWidget *parent = 0, const char *name = 0 ); 00029 ~CommitDialog(); 00030 00031 QString logMessage() const { return edit->text(); } 00032 QString user() const { return userEdit->text(); } 00033 QString client() const { return clientEdit->text(); } 00034 QString changeList() const; 00035 00036 void setUser( const QString& usr ) { userEdit->setText( usr ); } 00037 void setClient( const QString& clnt ) { clientEdit->setText( clnt ); } 00038 void setFiles( const QStringList& lst ); 00039 00041 void autoGuess(); 00042 00043 protected slots: 00044 void accept(); 00045 00046 private slots: 00047 void getFilesFinished( const QString& out, const QString& err ); 00048 00049 private: 00050 void setDepotFiles( const QStringList& lst ); 00051 QTextEdit *edit; 00052 KLineEdit *clientEdit, *userEdit; 00053 KListBox *filesBox; 00054 }; 00055 00056 #endif 00057