Fixes
[opsoft.git] / VimLine / src / dialogimpl.cpp
blob8abffcf9b84e11c2c10b9c0332d63ee5c7343af8
1 #include "dialogimpl.h"
2 //
3 DialogImpl::DialogImpl( QWidget * parent, Qt::WFlags f)
4 : QDialog(parent, f)
6 setupUi(this);
8 //
10 void DialogImpl::on_pushShow_clicked(bool checked)
12 // TODO
13 QString str;
14 QStringList list;
15 QString lineNum = "";
16 QString cmd;
18 str = lineLine->text();
19 if (str.length() < 1)
20 return;
22 list = str.split (":");
23 str = list.at (0);
24 if (list.size() == 2)
25 lineNum = list.at(1);
27 process = new QProcess;
28 cmd = QString ("gvim ") + str;
29 if (lineNum.length() > 0)
30 cmd += " +" + lineNum;
31 process->start (cmd);
32 printf ("%s\n", cmd.toStdString().c_str ());
33 lineLine->setText ("");