summaryrefslogtreecommitdiffstats
path: root/client/browser
diff options
context:
space:
mode:
authoradelcastillo <adelcastillo@us.es>2009-12-14 16:08:20 +0000
committeradelcastillo <adelcastillo@us.es>2009-12-14 16:08:20 +0000
commitc8f8a9cb5d14083e9486914ff5b8f4b4adf95aae (patch)
treedfee2b9c623155137ce9e8c9f10b6b2a0734539f /client/browser
parent6e139c9f40914b2e4463bc9d5deb2b5954dfb0e2 (diff)
Modo admin y user separado.
git-svn-id: https://opengnsys.es/svn/trunk@659 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/browser')
-rwxr-xr-xclient/browser/clean6
-rw-r--r--client/browser/src/mainwindow.cpp16
-rw-r--r--client/browser/src/mainwindow.h4
3 files changed, 16 insertions, 10 deletions
diff --git a/client/browser/clean b/client/browser/clean
new file mode 100755
index 00000000..bfec989f
--- /dev/null
+++ b/client/browser/clean
@@ -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}
diff --git a/client/browser/src/mainwindow.cpp b/client/browser/src/mainwindow.cpp
index 480b45db..7523f48b 100644
--- a/client/browser/src/mainwindow.cpp
+++ b/client/browser/src/mainwindow.cpp
@@ -34,6 +34,8 @@ MainWindow::MainWindow(QWidget *parent)
setCentralWidget(m_web);
+ readEnvironmentValues();
+
// Output
m_output->setReadOnly(true);
@@ -58,7 +60,8 @@ MainWindow::MainWindow(QWidget *parent)
dock->setWidget(m_tabs);
// Y el dock al mainwindow
- addDockWidget(Qt::BottomDockWidgetArea,dock);
+ if(m_env.contains("boot") && m_env["boot"] == "admin")
+ addDockWidget(Qt::BottomDockWidgetArea,dock);
// Top Dock
dock=new QDockWidget();
@@ -74,7 +77,8 @@ MainWindow::MainWindow(QWidget *parent)
dock->setWidget(m_webBar);
// dock al mainwindow
- addDockWidget(Qt::TopDockWidgetArea,dock);
+ if(m_env.contains("boot") && m_env["boot"] == "admin")
+ addDockWidget(Qt::TopDockWidgetArea,dock);
// Status bar
QStatusBar* st=statusBar();
@@ -108,9 +112,6 @@ MainWindow::MainWindow(QWidget *parent)
connect(button,SIGNAL(clicked()),this,SLOT(slotCreateTerminal()));
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"]!="")
{
QFile* file=new QFile(m_env["OGLOGFILE"]);
@@ -234,7 +235,7 @@ void MainWindow::slotProcessOutput()
char buf[BUFFERSIZE];
while((m_process->readLine(buf,BUFFERSIZE) > 0))
{
- print(tr("Proc. Output: ")+buf,false);
+ print(tr("Proc. Output: ")+buf);
QString s(buf);
captureOutputForStatusBar(s);
}
@@ -357,7 +358,7 @@ int MainWindow::readEnvironmentValues()
return ret;
}
-void MainWindow::print(QString s,bool newLine)
+void MainWindow::print(QString s)
{
if(!s.endsWith("\n"))
s+="\n";
@@ -386,7 +387,6 @@ void MainWindow::captureOutputForStatusBar(QString output)
{
int pass=rxPass.cap(1).toInt();
output.replace(rxPass,"");
- qDebug()<<pass<<output;
m_progressBar->setValue(pass);
m_progressBar->setFormat("%p% "+output);
}
diff --git a/client/browser/src/mainwindow.h b/client/browser/src/mainwindow.h
index e42e0c2b..76626e27 100644
--- a/client/browser/src/mainwindow.h
+++ b/client/browser/src/mainwindow.h
@@ -2,7 +2,7 @@
#define MAINWINDOW_H
#define PROTOCOL "command:"
-#define ENVIRONMENT "OGLOGFILE"
+#define ENVIRONMENT "OGLOGFILE,boot"
//#define ENVIRONMENT "OGIP,OGSERVER,OGLOG"
#include <QWidget>
@@ -56,7 +56,7 @@ class MainWindow : public QMainWindow
//Functions
protected:
int readEnvironmentValues();
- void print(QString s,bool newLine=true);
+ void print(QString s);
void captureOutputForStatusBar(QString output);
void startProgressBar();
void finishProgressBar();