From: Kern Sibbald Date: Fri, 26 Jan 2007 13:35:26 +0000 (+0000) Subject: Add new qt-console files X-Git-Tag: Release-2.0.2~39 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=df4018612141d3b857192245b70fae0c86bc4582;p=bacula%2Fbacula Add new qt-console files git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4046 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/qt-console/.cvsignore b/bacula/src/qt-console/.cvsignore index 372e024b92..9affc260e7 100644 --- a/bacula/src/qt-console/.cvsignore +++ b/bacula/src/qt-console/.cvsignore @@ -1,3 +1,10 @@ ui_main.h *.o qt-console +about-func +brestore.ui +main.qrc +mult-inheritance +print-func +qrc_main.cpp + diff --git a/bacula/src/qt-console/Makefile b/bacula/src/qt-console/Makefile index 168171b77d..5481fbd1fd 100644 --- a/bacula/src/qt-console/Makefile +++ b/bacula/src/qt-console/Makefile @@ -1,6 +1,6 @@ ############################################################################# # Makefile for building: qt-console -# Generated by qmake (2.01a) (Qt 4.2.1) on: Thu Jan 18 09:41:24 2007 +# Generated by qmake (2.01a) (Qt 4.2.1) on: Fri Jan 26 14:25:07 2007 # Project: qt-console.pro # Template: app # Command: /usr/bin/qmake -unix -o Makefile qt-console.pro @@ -45,8 +45,11 @@ OBJECTS_DIR = ./ ####### Files -SOURCES = main.cpp -OBJECTS = main.o +SOURCES = main.cpp \ + mainwindow.cpp qrc_main.cpp +OBJECTS = main.o \ + mainwindow.o \ + qrc_main.o DIST = /usr/share/qt4/mkspecs/common/unix.conf \ /usr/share/qt4/mkspecs/common/g++.conf \ /usr/share/qt4/mkspecs/common/linux.conf \ @@ -137,7 +140,7 @@ qmake: FORCE 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.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 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: @@ -163,8 +166,19 @@ mocables: compiler_moc_header_make_all compiler_moc_source_make_all compiler_moc_header_make_all: compiler_moc_header_clean: -compiler_rcc_make_all: +compiler_rcc_make_all: qrc_main.cpp compiler_rcc_clean: + -$(DEL_FILE) qrc_main.cpp +qrc_main.cpp: main.qrc \ + /usr/bin/rcc \ + images/new.png \ + images/copy.png \ + images/cut.png \ + images/save.png \ + images/paste.png \ + images/open.png + /usr/bin/rcc -name main main.qrc -o qrc_main.cpp + compiler_image_collection_make_all: qmake_image_collection.cpp compiler_image_collection_clean: -$(DEL_FILE) qmake_image_collection.cpp @@ -180,9 +194,17 @@ compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_image_coll ####### Compile -main.o: main.cpp ui_main.h +main.o: main.cpp mainwindow.h \ + ui_main.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp +mainwindow.o: mainwindow.cpp mainwindow.h \ + ui_main.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp + +qrc_main.o: qrc_main.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_main.o qrc_main.cpp + ####### Install install: FORCE diff --git a/bacula/src/qt-console/images/bat_icon.png b/bacula/src/qt-console/images/bat_icon.png new file mode 100644 index 0000000000..a368b2f9ad Binary files /dev/null and b/bacula/src/qt-console/images/bat_icon.png differ diff --git a/bacula/src/qt-console/images/copy.png b/bacula/src/qt-console/images/copy.png new file mode 100644 index 0000000000..f2c04dfe30 Binary files /dev/null and b/bacula/src/qt-console/images/copy.png differ diff --git a/bacula/src/qt-console/images/cut.png b/bacula/src/qt-console/images/cut.png new file mode 100644 index 0000000000..54638e9386 Binary files /dev/null and b/bacula/src/qt-console/images/cut.png differ diff --git a/bacula/src/qt-console/images/new.png b/bacula/src/qt-console/images/new.png new file mode 100644 index 0000000000..12131b0100 Binary files /dev/null and b/bacula/src/qt-console/images/new.png differ diff --git a/bacula/src/qt-console/images/open.png b/bacula/src/qt-console/images/open.png new file mode 100644 index 0000000000..45fa2883a7 Binary files /dev/null and b/bacula/src/qt-console/images/open.png differ diff --git a/bacula/src/qt-console/images/paste.png b/bacula/src/qt-console/images/paste.png new file mode 100644 index 0000000000..e38bbe5f24 Binary files /dev/null and b/bacula/src/qt-console/images/paste.png differ diff --git a/bacula/src/qt-console/images/print.png b/bacula/src/qt-console/images/print.png new file mode 100644 index 0000000000..2afb769ee2 Binary files /dev/null and b/bacula/src/qt-console/images/print.png differ diff --git a/bacula/src/qt-console/images/save.png b/bacula/src/qt-console/images/save.png new file mode 100644 index 0000000000..daba865faf Binary files /dev/null and b/bacula/src/qt-console/images/save.png differ diff --git a/bacula/src/qt-console/images/undo.png b/bacula/src/qt-console/images/undo.png new file mode 100644 index 0000000000..eee23d24a3 Binary files /dev/null and b/bacula/src/qt-console/images/undo.png differ diff --git a/bacula/src/qt-console/main.cpp b/bacula/src/qt-console/main.cpp index ca50409f9b..f0d73b8015 100644 --- a/bacula/src/qt-console/main.cpp +++ b/bacula/src/qt-console/main.cpp @@ -27,20 +27,15 @@ */ - -#include "ui_main.h" -#include +#include "mainwindow.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); app.setQuitOnLastWindowClosed(true); - QMainWindow *main = new QMainWindow; - Ui::MainWindow ui; - ui.setupUi(main); + MainWindow *main = new MainWindow; - ui.textEdit->setPlainText("Hello Baculites\nThis is the main console window."); main->show(); return app.exec(); } diff --git a/bacula/src/qt-console/main.ui b/bacula/src/qt-console/main.ui index 4ccf010a6c..b4804a62bf 100644 --- a/bacula/src/qt-console/main.ui +++ b/bacula/src/qt-console/main.ui @@ -1,16 +1,20 @@ - MainWindow - + Kern Sibbald + MainForm + 0 0 889 - 600 + 802 - MainWindow + qt-console + + + images/bat_icon.png @@ -102,8 +106,7 @@ 1 - - + 9 @@ -152,6 +155,33 @@ + + + + 9 + + + 6 + + + + + 0 + + + + Restore 1 + + + + + Restore 2 + + + + + + @@ -183,22 +213,41 @@ 0 0 889 - 28 + 33 + + + Help + + + + + + Edit + + + + + File + + + + + - 15 - 6 + 51 + 39 @@ -207,25 +256,78 @@ 4 + + + + + Quit + + + + + About qt-console + + + + + images/copy.png + + + Copy + + + + + images/cut.png + + + Cut + + + + + images/new.png + + + new + + + + + images/open.png + + + open + + + + + images/paste.png + + + Paste + + + + + images/print.png + + + Print + + + + + images/save.png + + + Save + + - - - - lineEdit - textChanged(QString) - textEdit - setText(QString) - - - 137 - 560 - - - 192 - 407 - - - - + + + + diff --git a/bacula/src/qt-console/mainwindow.cpp b/bacula/src/qt-console/mainwindow.cpp new file mode 100644 index 0000000000..3e886018e2 --- /dev/null +++ b/bacula/src/qt-console/mainwindow.cpp @@ -0,0 +1,10 @@ + +#include "mainwindow.h" + + +MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) +{ + setupUi(this); + stackedWidget->setCurrentIndex(0); + textEdit->setPlainText("Hello Baculites\nThis is the main console window."); +} diff --git a/bacula/src/qt-console/mainwindow.h b/bacula/src/qt-console/mainwindow.h new file mode 100644 index 0000000000..50522277a1 --- /dev/null +++ b/bacula/src/qt-console/mainwindow.h @@ -0,0 +1,9 @@ +#include +#include "ui_main.h" + +class MainWindow : public QMainWindow, public Ui::MainForm +{ + +public: + MainWindow(QWidget *parent = 0); +}; diff --git a/bacula/src/qt-console/qt-console.pro b/bacula/src/qt-console/qt-console.pro index 9354a1f3e0..f51422bd13 100644 --- a/bacula/src/qt-console/qt-console.pro +++ b/bacula/src/qt-console/qt-console.pro @@ -6,7 +6,9 @@ TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . +RESOURCES = main.qrc # Input FORMS += main.ui SOURCES += main.cpp +SOURCES += mainwindow.cpp