#############################################################################
# Makefile for building: qt-console
-# Generated by qmake (2.01a) (Qt 4.2.1) on: Fri Jan 26 14:25:07 2007
+# Generated by qmake (2.01a) (Qt 4.2.1) on: Fri Jan 26 15:30:33 2007
# Project: qt-console.pro
# Template: app
# Command: /usr/bin/qmake -unix -o Makefile qt-console.pro
####### Files
SOURCES = main.cpp \
- mainwindow.cpp qrc_main.cpp
+ mainwindow.cpp moc_mainwindow.cpp \
+ qrc_main.cpp
OBJECTS = main.o \
mainwindow.o \
+ moc_mainwindow.o \
qrc_main.o
DIST = /usr/share/qt4/mkspecs/common/unix.conf \
/usr/share/qt4/mkspecs/common/g++.conf \
dist:
@$(CHK_DIR_EXISTS) .tmp/qt-console1.0.0 || $(MKDIR) .tmp/qt-console1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qt-console1.0.0/ && $(COPY_FILE) --parents main.qrc .tmp/qt-console1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp .tmp/qt-console1.0.0/ && $(COPY_FILE) --parents main.ui .tmp/qt-console1.0.0/ && (cd `dirname .tmp/qt-console1.0.0` && $(TAR) qt-console1.0.0.tar qt-console1.0.0 && $(COMPRESS) qt-console1.0.0.tar) && $(MOVE) `dirname .tmp/qt-console1.0.0`/qt-console1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/qt-console1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/qt-console1.0.0/ && $(COPY_FILE) --parents mainwindow.h .tmp/qt-console1.0.0/ && $(COPY_FILE) --parents main.qrc .tmp/qt-console1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp .tmp/qt-console1.0.0/ && $(COPY_FILE) --parents main.ui .tmp/qt-console1.0.0/ && (cd `dirname .tmp/qt-console1.0.0` && $(TAR) qt-console1.0.0.tar qt-console1.0.0 && $(COMPRESS) qt-console1.0.0.tar) && $(MOVE) `dirname .tmp/qt-console1.0.0`/qt-console1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/qt-console1.0.0
yaccclean:
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
-compiler_moc_header_make_all:
+compiler_moc_header_make_all: moc_mainwindow.cpp
compiler_moc_header_clean:
+ -$(DEL_FILE) moc_mainwindow.cpp
+moc_mainwindow.cpp: ui_main.h \
+ mainwindow.h \
+ /usr/bin/moc
+ /usr/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp
+
compiler_rcc_make_all: qrc_main.cpp
compiler_rcc_clean:
-$(DEL_FILE) qrc_main.cpp
ui_main.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
+moc_mainwindow.o: moc_mainwindow.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
+
qrc_main.o: qrc_main.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_main.o qrc_main.cpp
--- /dev/null
+
+At the current time, the contents of this directory are under
+development. If you want to help, please contact Kern directly.
+If you want to build it, you need Qt4 loaded and setup as your
+default Qt or with the appropriate Qt Environment variables set.
+
+To build the qt-console, you simply enter:
+
+ qmake
+ make
+
+then to execute it
+
+ ./qt-console
+
+The qmake command needs to be entered only if you add a new file, in
+which case, you should edit qt-console.pro and add the new filename
+in the appropriate place. In running qmake, it will build a new
+Makefile, and there after, you simply use "make".
+
+
#include "mainwindow.h"
+#include <QApplication>
int main(int argc, char *argv[])
{
</size>
</property>
<property name="currentIndex" >
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="pageConsole" >
<layout class="QGridLayout" >
+/*
+ Bacula® - The Network Backup Solution
-#include "mainwindow.h"
+ Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+ The main author of Bacula is Kern Sibbald, with contributions from
+ many others, a complete list can be found in the file AUTHORS.
+ This program is Free Software; you can redistribute it and/or
+ modify it under the terms of version two of the GNU General Public
+ License as published by the Free Software Foundation plus additions
+ that are listed in the file LICENSE.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ Bacula® is a registered trademark of John Walker.
+ The licensor of Bacula is the Free Software Foundation Europe
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ * Main Window control for qt-console
+ *
+ * Kern Sibbald, January MMVI
+ *
+ */
+
+#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
- setupUi(this);
+ setupUi(this); /* Setup UI defined by main.ui (designer) */
stackedWidget->setCurrentIndex(0);
+ /* Dummy message ***FIXME*** remove a bit later */
textEdit->setPlainText("Hello Baculites\nThis is the main console window.");
+ /* Connect command line edit to input_line */
+ connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(input_line()));
+ lineEdit->setFocus();
+}
+
+/*
+ * The user just finished typing a line in the command line edit box
+ */
+void MainWindow::input_line()
+{
+ QString cmdStr = lineEdit->text(); /* Get the text */
+ lineEdit->clear(); /* clear the lineEdit box */
+ textEdit->append(cmdStr); /* append text on screen */
}
+/*
+ Bacula® - The Network Backup Solution
+
+ Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+ The main author of Bacula is Kern Sibbald, with contributions from
+ many others, a complete list can be found in the file AUTHORS.
+ This program is Free Software; you can redistribute it and/or
+ modify it under the terms of version two of the GNU General Public
+ License as published by the Free Software Foundation plus additions
+ that are listed in the file LICENSE.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ Bacula® is a registered trademark of John Walker.
+ The licensor of Bacula is the Free Software Foundation Europe
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ Switzerland, email:ftf@fsfeurope.org.
+*/
+
+/*
+ * qt-console main window class definition.
+ *
+ * Written by Kern Sibbald, January MMVI
+ */
+
+
#include <QtGui>
#include "ui_main.h"
class MainWindow : public QMainWindow, public Ui::MainForm
{
+ Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
+
+public slots:
+ void input_line();
+
+private:
+ QString m_UserInput;
};
# Input
FORMS += main.ui
+HEADERS += mainwindow.h
SOURCES += main.cpp
SOURCES += mainwindow.cpp