00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef WSCOUT_GUI_FILTER_DIALOG_HXX_
00024 # define WSCOUT_GUI_FILTER_DIALOG_HXX_
00025
00026 # include "wscout_gui_filter_dialog.hh"
00027
00028 namespace wscout
00029 {
00030
00031 namespace gui
00032 {
00033
00034 inline
00035 QString
00036 FilterDialog::inputFileName() const
00037 {
00038 return in_file_name_;
00039 }
00040
00041 inline
00042 void
00043 FilterDialog::setInputFileName(const QString& n)
00044 {
00045 in_file_name_ = n;
00046 }
00047
00048 inline
00049 QString
00050 FilterDialog::outputFileName() const
00051 {
00052 return out_file_name_.text();
00053 }
00054
00055 inline
00056 void
00057 FilterDialog::setOutputFileName(const QString& n)
00058 {
00059 out_file_name_.setText(n);
00060 }
00061
00062 inline
00063 void
00064 FilterDialog::setDefaultFilter(const QString& f)
00065 {
00066 default_filter_ = f;
00067 }
00068
00069 inline
00070 void
00071 FilterDialog::setDefaultCommand(const QString& c)
00072 {
00073 default_command_ = c;
00074 }
00075
00076 inline
00077 std::string
00078 FilterDialog::commandLine() const
00079 {
00080 return
00081 command_.text()
00082 .arg(in_file_name_)
00083 .arg(out_file_name_.text())
00084 .arg(filter_.text()).toStdString();
00085 }
00086
00087 inline
00088 QString
00089 FilterDialog::prettyCommandLine() const
00090 {
00091 return tr("<p><b>Command line</b></p>"
00092 "<p><code>") + commandLine().c_str() + tr("</code></p>");
00093 }
00094
00095 inline
00096 QString
00097 FilterDialog::prettyProcessOutput()
00098 {
00099 return
00100 tr("<p><b>Process output</b></p>"
00101 "<p><code>") + process_.readAll() + tr("</code></p>");
00102 }
00103
00104 }
00105
00106 }
00107
00108 #endif // ! WSCOUT_GUI_FILTER_DIALOG_HXX_