#############################################################################
# Makefile for building: bat
-# Generated by qmake (2.01a) (Qt 4.2.1) on: Thu Feb 1 11:50:08 2007
+# Generated by qmake (2.01a) (Qt 4.2.1) on: Sat Feb 3 11:19:57 2007
# Project: bat.pro
# Template: app
# Command: /usr/bin/qmake -unix -o Makefile bat.pro
all: Makefile $(TARGET)
-$(TARGET): ui_main.h ui_label.h $(OBJECTS)
+$(TARGET): ui_main.h ui_label.h ui_console.h $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile: bat.pro /usr/share/qt4/mkspecs/default/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
dist:
@$(CHK_DIR_EXISTS) .tmp/bat1.0.0 || $(MKDIR) .tmp/bat1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/bat1.0.0/ && $(COPY_FILE) --parents mainwin.h bat.h bat_conf.h console/console.h .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.qrc .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp console/authenticate.cpp console/console.cpp .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.ui label.ui .tmp/bat1.0.0/ && (cd `dirname .tmp/bat1.0.0` && $(TAR) bat1.0.0.tar bat1.0.0 && $(COMPRESS) bat1.0.0.tar) && $(MOVE) `dirname .tmp/bat1.0.0`/bat1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/bat1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/bat1.0.0/ && $(COPY_FILE) --parents mainwin.h bat.h bat_conf.h console/console.h .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.qrc .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp console/authenticate.cpp console/console.cpp .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.ui label.ui console/console.ui .tmp/bat1.0.0/ && (cd `dirname .tmp/bat1.0.0` && $(TAR) bat1.0.0.tar bat1.0.0 && $(COMPRESS) bat1.0.0.tar) && $(MOVE) `dirname .tmp/bat1.0.0`/bat1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/bat1.0.0
yaccclean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
-compiler_uic_make_all: ui_main.h ui_label.h
+compiler_uic_make_all: ui_main.h ui_label.h ui_console.h
compiler_uic_clean:
- -$(DEL_FILE) ui_main.h ui_label.h
+ -$(DEL_FILE) ui_main.h ui_label.h ui_console.h
ui_main.h: main.ui
/usr/bin/uic main.ui -o ui_main.h
ui_label.h: label.ui
/usr/bin/uic label.ui -o ui_label.h
+ui_console.h: console/console.ui
+ /usr/bin/uic console/console.ui -o ui_console.h
+
compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_image_collection_clean compiler_moc_source_clean compiler_uic_clean
####### Compile
FORMS += main.ui
# Label dialog
FORMS += label.ui
+FORMS += console/console.ui
HEADERS += mainwin.h bat.h bat_conf.h
#include "bat.h"
#include "console.h"
-Console::Console()
+Console::Console(QStackedWidget *parent)
{
QFont font;
QTreeWidgetItem *item, *topItem;
QTreeWidget *treeWidget = mainWin->treeWidget;
+ setupUi(this);
+ parent->addWidget(this);
m_sock = NULL;
m_at_prompt = false;
- m_textEdit = mainWin->textEdit; /* our console screen */
+ m_textEdit = textEdit; /* our console screen */
m_cursor = new QTextCursor(m_textEdit->document());
mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/disconnected.png")));
{
JCR jcr;
- m_textEdit = mainWin->textEdit; /* our console screen */
+ m_textEdit = textEdit; /* our console screen */
if (!m_dir) {
mainWin->set_status("No Director found.");
#define _CONSOLE_H_
#include <QtGui>
+#include "ui_console.h"
class DIRRES;
class BSOCK;
class JCR;
class CONRES;
-class Console : public QWidget
+class Console : public QWidget, public Ui::ConsoleForm
{
Q_OBJECT
public:
- Console();
+ Console(QStackedWidget *parent);
void set_text(const char *buf);
void set_text(const QString buf);
void set_textf(const char *fmt, ...);
--- /dev/null
+<ui version="4.0" >
+ <class>ConsoleForm</class>
+ <widget class="QWidget" name="ConsoleForm" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>432</width>
+ <height>422</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Console</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QDockWidget" name="dockWidget" >
+ <widget class="QWidget" name="dockWidgetContents" >
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QTextEdit" name="textEdit" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>200</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="sizeIncrement" >
+ <size>
+ <width>1</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="acceptDrops" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string comment="Console Window" />
+ </property>
+ <property name="statusTip" >
+ <string comment="Console Window" />
+ </property>
+ <property name="whatsThis" >
+ <string comment="Console Window" />
+ </property>
+ <property name="horizontalScrollBarPolicy" >
+ <enum>Qt::ScrollBarAsNeeded</enum>
+ </property>
+ <property name="documentTitle" >
+ <string comment="Console Window" />
+ </property>
+ <property name="lineWrapMode" >
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
</size>
</property>
<property name="currentIndex" >
- <number>0</number>
+ <number>-1</number>
</property>
- <widget class="QWidget" name="pageConsole" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <widget class="QTextEdit" name="textEdit" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>7</vsizetype>
- <horstretch>200</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="sizeIncrement" >
- <size>
- <width>1</width>
- <height>0</height>
- </size>
- </property>
- <property name="focusPolicy" >
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="acceptDrops" >
- <bool>false</bool>
- </property>
- <property name="toolTip" >
- <string comment="Console Window" />
- </property>
- <property name="statusTip" >
- <string comment="Console Window" />
- </property>
- <property name="whatsThis" >
- <string comment="Console Window" />
- </property>
- <property name="horizontalScrollBarPolicy" >
- <enum>Qt::ScrollBarAsNeeded</enum>
- </property>
- <property name="documentTitle" >
- <string comment="Console Window" />
- </property>
- <property name="lineWrapMode" >
- <enum>QTextEdit::NoWrap</enum>
- </property>
- <property name="readOnly" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="Restore" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <widget class="QTabWidget" name="tabWidget" >
- <property name="currentIndex" >
- <number>0</number>
- </property>
- <widget class="QWidget" name="restore_1" >
- <attribute name="title" >
- <string>Restore 1</string>
- </attribute>
- </widget>
- <widget class="QWidget" name="restore_2" >
- <attribute name="title" >
- <string>Restore 2</string>
- </attribute>
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
</widget>
</widget>
</item>
<number>4</number>
</attribute>
<addaction name="actionConnect" />
- <addaction name="actionSave" />
- <addaction name="actionPrint" />
<addaction name="actionStatusDir" />
<addaction name="actionLabel" />
<addaction name="actionRestore" />
{
mainWin = this;
setupUi(this); /* Setup UI defined by main.ui (designer) */
- stackedWidget->setCurrentIndex(0);
statusBar()->showMessage("Director not connected. Click on connect button.");
- m_console = new Console();
+ m_console = new Console(stackedWidget);
+ stackedWidget->setCurrentIndex(0);
lineEdit->setFocus();