]> git.sur5r.net Git - bacula/bacula/commitdiff
Add new qt-console files
authorKern Sibbald <kern@sibbald.com>
Fri, 26 Jan 2007 13:35:26 +0000 (13:35 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 26 Jan 2007 13:35:26 +0000 (13:35 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4046 91ce42f0-d328-0410-95d8-f526ca767f89

16 files changed:
bacula/src/qt-console/.cvsignore
bacula/src/qt-console/Makefile
bacula/src/qt-console/images/bat_icon.png [new file with mode: 0644]
bacula/src/qt-console/images/copy.png [new file with mode: 0644]
bacula/src/qt-console/images/cut.png [new file with mode: 0644]
bacula/src/qt-console/images/new.png [new file with mode: 0644]
bacula/src/qt-console/images/open.png [new file with mode: 0644]
bacula/src/qt-console/images/paste.png [new file with mode: 0644]
bacula/src/qt-console/images/print.png [new file with mode: 0644]
bacula/src/qt-console/images/save.png [new file with mode: 0644]
bacula/src/qt-console/images/undo.png [new file with mode: 0644]
bacula/src/qt-console/main.cpp
bacula/src/qt-console/main.ui
bacula/src/qt-console/mainwindow.cpp [new file with mode: 0644]
bacula/src/qt-console/mainwindow.h [new file with mode: 0644]
bacula/src/qt-console/qt-console.pro

index 372e024b925c44d85f271577a4c4cb7d11797fb5..9affc260e7e5935af9ff543ff0015ba82ae4bff8 100644 (file)
@@ -1,3 +1,10 @@
 ui_main.h
 *.o
 qt-console
+about-func
+brestore.ui
+main.qrc
+mult-inheritance
+print-func
+qrc_main.cpp
+
index 168171b77dd6768da3335ae14628c4a9f2e2ab0f..5481fbd1fda027d44e9dcc9eb2d9229aa7f56e37 100644 (file)
@@ -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 (file)
index 0000000..a368b2f
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 (file)
index 0000000..f2c04df
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 (file)
index 0000000..54638e9
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 (file)
index 0000000..12131b0
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 (file)
index 0000000..45fa288
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 (file)
index 0000000..e38bbe5
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 (file)
index 0000000..2afb769
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 (file)
index 0000000..daba865
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 (file)
index 0000000..eee23d2
Binary files /dev/null and b/bacula/src/qt-console/images/undo.png differ
index ca50409f9bad5b47795bae32b35cb172b8658ed1..f0d73b8015aa6d95d2282b801c59f7eee4b9309c 100644 (file)
 */
 
 
-
-#include "ui_main.h"
-#include <QtGui>
+#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();
 }
index 4ccf010a6c2fe1a5a41b35e6ce32742828a47813..b4804a62bf26c2621d902fe956526da9cf124a27 100644 (file)
@@ -1,16 +1,20 @@
 <ui version="4.0" >
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
+ <author>Kern Sibbald</author>
+ <class>MainForm</class>
+ <widget class="QMainWindow" name="MainForm" >
   <property name="geometry" >
    <rect>
     <x>0</x>
     <y>0</y>
     <width>889</width>
-    <height>600</height>
+    <height>802</height>
    </rect>
   </property>
   <property name="windowTitle" >
-   <string>MainWindow</string>
+   <string>qt-console</string>
+  </property>
+  <property name="windowIcon" >
+   <iconset>images/bat_icon.png</iconset>
   </property>
   <widget class="QWidget" name="centralwidget" >
    <layout class="QGridLayout" >
        <property name="currentIndex" >
         <number>1</number>
        </property>
-       <widget class="QWidget" name="page" />
-       <widget class="QWidget" name="page_2" >
+       <widget class="QWidget" name="pageConsole" >
         <layout class="QGridLayout" >
          <property name="margin" >
           <number>9</number>
          </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>
      <x>0</x>
      <y>0</y>
      <width>889</width>
-     <height>28</height>
+     <height>33</height>
     </rect>
    </property>
+   <widget class="QMenu" name="menuHelp" >
+    <property name="title" >
+     <string>Help</string>
+    </property>
+    <addaction name="actionAbout_qt_console" />
+   </widget>
+   <widget class="QMenu" name="menuEdit" >
+    <property name="title" >
+     <string>Edit</string>
+    </property>
+    <addaction name="actionCopy" />
+    <addaction name="actionCut" />
+    <addaction name="actionPaste" />
+   </widget>
    <widget class="QMenu" name="menuFile" >
     <property name="title" >
      <string>File</string>
     </property>
+    <addaction name="actionPrint" />
+    <addaction name="actionSave" />
+    <addaction name="actionExit" />
    </widget>
    <addaction name="menuFile" />
+   <addaction name="menuEdit" />
+   <addaction name="menuHelp" />
   </widget>
   <widget class="QStatusBar" name="statusbar" />
   <widget class="QToolBar" name="toolBar" >
    <property name="minimumSize" >
     <size>
-     <width>15</width>
-     <height>6</height>
+     <width>51</width>
+     <height>39</height>
     </size>
    </property>
    <property name="orientation" >
    <attribute name="toolBarArea" >
     <number>4</number>
    </attribute>
+   <addaction name="actionSave" />
+   <addaction name="actionPrint" />
   </widget>
+  <action name="actionExit" >
+   <property name="text" >
+    <string>Quit</string>
+   </property>
+  </action>
+  <action name="actionAbout_qt_console" >
+   <property name="text" >
+    <string>About qt-console</string>
+   </property>
+  </action>
+  <action name="actionCopy" >
+   <property name="icon" >
+    <iconset>images/copy.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Copy</string>
+   </property>
+  </action>
+  <action name="actionCut" >
+   <property name="icon" >
+    <iconset>images/cut.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Cut</string>
+   </property>
+  </action>
+  <action name="actionNew" >
+   <property name="icon" >
+    <iconset>images/new.png</iconset>
+   </property>
+   <property name="text" >
+    <string>new</string>
+   </property>
+  </action>
+  <action name="actionOpen" >
+   <property name="icon" >
+    <iconset>images/open.png</iconset>
+   </property>
+   <property name="text" >
+    <string>open</string>
+   </property>
+  </action>
+  <action name="actionPaste" >
+   <property name="icon" >
+    <iconset>images/paste.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Paste</string>
+   </property>
+  </action>
+  <action name="actionPrint" >
+   <property name="icon" >
+    <iconset>images/print.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Print</string>
+   </property>
+  </action>
+  <action name="actionSave" >
+   <property name="icon" >
+    <iconset>images/save.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Save</string>
+   </property>
+  </action>
  </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>lineEdit</sender>
-   <signal>textChanged(QString)</signal>
-   <receiver>textEdit</receiver>
-   <slot>setText(QString)</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>137</x>
-     <y>560</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>192</x>
-     <y>407</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
+ <resources>
+  <include location="main.qrc" />
+ </resources>
+ <connections/>
 </ui>
diff --git a/bacula/src/qt-console/mainwindow.cpp b/bacula/src/qt-console/mainwindow.cpp
new file mode 100644 (file)
index 0000000..3e88601
--- /dev/null
@@ -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 (file)
index 0000000..5052227
--- /dev/null
@@ -0,0 +1,9 @@
+#include <QtGui>
+#include "ui_main.h"
+
+class MainWindow : public QMainWindow, public Ui::MainForm    
+{
+
+public:
+   MainWindow(QWidget *parent = 0);
+};
index 9354a1f3e0a01902f8c5c591fbf2cad5d4fa0af1..f51422bd13d7827ebcf4368ced8c97182dcd496d 100644 (file)
@@ -6,7 +6,9 @@ TEMPLATE = app
 TARGET = 
 DEPENDPATH += .
 INCLUDEPATH += .
+RESOURCES = main.qrc
 
 # Input
 FORMS += main.ui
 SOURCES += main.cpp
+SOURCES += mainwindow.cpp