Modo admin y user separado.
git-svn-id: https://opengnsys.es/svn/trunk@659 a21b9725-9963-47de-94b9-378ad31fedc9remotes/github/master
parent
c70d4bef44
commit
0b5cc5ad64
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rm -fv browser browser_d libqtermwidget.a libqtermwidget_d.a Makefile
|
||||||
|
rm -rfv .moc .objs_d .objs
|
||||||
|
rm -fv qtermwidget/Makefile qtermwidget/src/Makefile{,.Debug,.Release}
|
||||||
|
rm -fv src/Makefile{,.Debug,.Release}
|
|
@ -34,6 +34,8 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
|
|
||||||
setCentralWidget(m_web);
|
setCentralWidget(m_web);
|
||||||
|
|
||||||
|
readEnvironmentValues();
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
m_output->setReadOnly(true);
|
m_output->setReadOnly(true);
|
||||||
|
|
||||||
|
@ -58,6 +60,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
dock->setWidget(m_tabs);
|
dock->setWidget(m_tabs);
|
||||||
|
|
||||||
// Y el dock al mainwindow
|
// Y el dock al mainwindow
|
||||||
|
if(m_env.contains("boot") && m_env["boot"] == "admin")
|
||||||
addDockWidget(Qt::BottomDockWidgetArea,dock);
|
addDockWidget(Qt::BottomDockWidgetArea,dock);
|
||||||
|
|
||||||
// Top Dock
|
// Top Dock
|
||||||
|
@ -74,6 +77,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
dock->setWidget(m_webBar);
|
dock->setWidget(m_webBar);
|
||||||
|
|
||||||
// dock al mainwindow
|
// dock al mainwindow
|
||||||
|
if(m_env.contains("boot") && m_env["boot"] == "admin")
|
||||||
addDockWidget(Qt::TopDockWidgetArea,dock);
|
addDockWidget(Qt::TopDockWidgetArea,dock);
|
||||||
|
|
||||||
// Status bar
|
// Status bar
|
||||||
|
@ -108,9 +112,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
connect(button,SIGNAL(clicked()),this,SLOT(slotCreateTerminal()));
|
connect(button,SIGNAL(clicked()),this,SLOT(slotCreateTerminal()));
|
||||||
connect(m_webBar,SIGNAL(returnPressed()),this,SLOT(slotWebBarReturnPressed()));
|
connect(m_webBar,SIGNAL(returnPressed()),this,SLOT(slotWebBarReturnPressed()));
|
||||||
|
|
||||||
if(!readEnvironmentValues())
|
|
||||||
print(tr("Any environment variable/s didn't be setted."));
|
|
||||||
|
|
||||||
if(m_env.contains("OGLOGFILE") && m_env["OGLOGFILE"]!="")
|
if(m_env.contains("OGLOGFILE") && m_env["OGLOGFILE"]!="")
|
||||||
{
|
{
|
||||||
QFile* file=new QFile(m_env["OGLOGFILE"]);
|
QFile* file=new QFile(m_env["OGLOGFILE"]);
|
||||||
|
@ -234,7 +235,7 @@ void MainWindow::slotProcessOutput()
|
||||||
char buf[BUFFERSIZE];
|
char buf[BUFFERSIZE];
|
||||||
while((m_process->readLine(buf,BUFFERSIZE) > 0))
|
while((m_process->readLine(buf,BUFFERSIZE) > 0))
|
||||||
{
|
{
|
||||||
print(tr("Proc. Output: ")+buf,false);
|
print(tr("Proc. Output: ")+buf);
|
||||||
QString s(buf);
|
QString s(buf);
|
||||||
captureOutputForStatusBar(s);
|
captureOutputForStatusBar(s);
|
||||||
}
|
}
|
||||||
|
@ -357,7 +358,7 @@ int MainWindow::readEnvironmentValues()
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::print(QString s,bool newLine)
|
void MainWindow::print(QString s)
|
||||||
{
|
{
|
||||||
if(!s.endsWith("\n"))
|
if(!s.endsWith("\n"))
|
||||||
s+="\n";
|
s+="\n";
|
||||||
|
@ -386,7 +387,6 @@ void MainWindow::captureOutputForStatusBar(QString output)
|
||||||
{
|
{
|
||||||
int pass=rxPass.cap(1).toInt();
|
int pass=rxPass.cap(1).toInt();
|
||||||
output.replace(rxPass,"");
|
output.replace(rxPass,"");
|
||||||
qDebug()<<pass<<output;
|
|
||||||
m_progressBar->setValue(pass);
|
m_progressBar->setValue(pass);
|
||||||
m_progressBar->setFormat("%p% "+output);
|
m_progressBar->setFormat("%p% "+output);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#define PROTOCOL "command:"
|
#define PROTOCOL "command:"
|
||||||
#define ENVIRONMENT "OGLOGFILE"
|
#define ENVIRONMENT "OGLOGFILE,boot"
|
||||||
//#define ENVIRONMENT "OGIP,OGSERVER,OGLOG"
|
//#define ENVIRONMENT "OGIP,OGSERVER,OGLOG"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
@ -56,7 +56,7 @@ class MainWindow : public QMainWindow
|
||||||
//Functions
|
//Functions
|
||||||
protected:
|
protected:
|
||||||
int readEnvironmentValues();
|
int readEnvironmentValues();
|
||||||
void print(QString s,bool newLine=true);
|
void print(QString s);
|
||||||
void captureOutputForStatusBar(QString output);
|
void captureOutputForStatusBar(QString output);
|
||||||
void startProgressBar();
|
void startProgressBar();
|
||||||
void finishProgressBar();
|
void finishProgressBar();
|
||||||
|
|
Loading…
Reference in New Issue