]> git.sur5r.net Git - bacula/bacula/commitdiff
First cut label dialog
authorKern Sibbald <kern@sibbald.com>
Fri, 9 Feb 2007 19:52:24 +0000 (19:52 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 9 Feb 2007 19:52:24 +0000 (19:52 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4155 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/Makefile
bacula/src/qt-console/bat.pro
bacula/src/qt-console/console/console.cpp
bacula/src/qt-console/label.ui [deleted file]
bacula/src/qt-console/label/label.cpp [new file with mode: 0644]
bacula/src/qt-console/label/label.h [new file with mode: 0644]
bacula/src/qt-console/label/label.ui [new file with mode: 0644]
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/mainwin.h

index ec897f84ef61f571bff8f064d2203a1fb6da26e4..e25c2fcbb0e138cf94388ca9f5f6e19caf2024a8 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: bat
-# Generated by qmake (2.01a) (Qt 4.2.1) on: Sun Feb 4 16:56:30 2007
+# Generated by qmake (2.01a) (Qt 4.2.1) on: Fri Feb 9 18:42:06 2007
 # Project:  bat.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile bat.pro
@@ -51,9 +51,11 @@ SOURCES       = main.cpp \
                qstd.cpp \
                console/authenticate.cpp \
                console/console.cpp \
-               restore/brestore.cpp moc_mainwin.cpp \
+               restore/brestore.cpp \
+               label/label.cpp moc_mainwin.cpp \
                moc_console.cpp \
                moc_restore.cpp \
+               moc_label.cpp \
                qrc_main.cpp
 OBJECTS       = main.o \
                bat_conf.o \
@@ -62,9 +64,11 @@ OBJECTS       = main.o \
                authenticate.o \
                console.o \
                brestore.o \
+               label.o \
                moc_mainwin.o \
                moc_console.o \
                moc_restore.o \
+               moc_label.o \
                qrc_main.o
 DIST          = /usr/share/qt4/mkspecs/common/unix.conf \
                /usr/share/qt4/mkspecs/common/g++.conf \
@@ -156,7 +160,7 @@ qmake:  FORCE
 
 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 qstd.h console/console.h restore/restore.h .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.qrc .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp qstd.cpp console/authenticate.cpp console/console.cpp restore/brestore.cpp .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.ui label.ui console/console.ui restore/brestore.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 qstd.h console/console.h restore/restore.h label/label.h .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.qrc .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp qstd.cpp console/authenticate.cpp console/console.cpp restore/brestore.cpp label/label.cpp .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.ui label/label.ui console/console.ui restore/brestore.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:
@@ -180,9 +184,9 @@ mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
 
-compiler_moc_header_make_all: moc_mainwin.cpp moc_console.cpp moc_restore.cpp
+compiler_moc_header_make_all: moc_mainwin.cpp moc_console.cpp moc_restore.cpp moc_label.cpp
 compiler_moc_header_clean:
-       -$(DEL_FILE) moc_mainwin.cpp moc_console.cpp moc_restore.cpp
+       -$(DEL_FILE) moc_mainwin.cpp moc_console.cpp moc_restore.cpp moc_label.cpp
 moc_mainwin.cpp: ui_main.h \
                mainwin.h \
                /usr/bin/moc
@@ -198,6 +202,11 @@ moc_restore.cpp: ui_brestore.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) restore/restore.h -o moc_restore.cpp
 
+moc_label.cpp: ui_label.h \
+               label/label.h \
+               /usr/bin/moc
+       /usr/bin/moc $(DEFINES) $(INCPATH) label/label.h -o moc_label.cpp
+
 compiler_rcc_make_all: qrc_main.cpp
 compiler_rcc_clean:
        -$(DEL_FILE) qrc_main.cpp
@@ -230,8 +239,8 @@ compiler_uic_clean:
 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_label.h: label/label.ui
+       /usr/bin/uic label/label.ui -o ui_label.h
 
 ui_console.h: console/console.ui
        /usr/bin/uic console/console.ui -o ui_console.h
@@ -288,6 +297,15 @@ brestore.o: restore/brestore.cpp bat.h \
                ui_brestore.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o brestore.o restore/brestore.cpp
 
+label.o: label/label.cpp bat.h \
+               mainwin.h \
+               ui_main.h \
+               bat_conf.h \
+               qstd.h \
+               label/label.h \
+               ui_label.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o label.o label/label.cpp
+
 moc_mainwin.o: moc_mainwin.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwin.o moc_mainwin.cpp
 
@@ -297,6 +315,9 @@ moc_console.o: moc_console.cpp
 moc_restore.o: moc_restore.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_restore.o moc_restore.cpp
 
+moc_label.o: moc_label.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_label.o moc_label.cpp
+
 qrc_main.o: qrc_main.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_main.o qrc_main.cpp
 
index db24cd27ee96f70b3ebc6e08776d8f75675484e3..280b37ad7aaa7a69572a6f20be4009f9c21d0fa2 100644 (file)
@@ -15,7 +15,7 @@ RESOURCES = main.qrc
 # Main window
 FORMS += main.ui
 # Label dialog
-FORMS += label.ui
+FORMS += label/label.ui
 FORMS += console/console.ui
 FORMS += restore/brestore.ui
 
@@ -32,3 +32,5 @@ HEADERS += restore/restore.h
 SOURCES += restore/brestore.cpp
 
 # Label dialog
+HEADERS += label/label.h
+SOURCES += label/label.cpp
index 2cee7bbe8fda13cf3954a9b41e1786d03ce0837b..9ff33183b978324c5b6312510a495c9aacf8caa5 100644 (file)
@@ -147,10 +147,10 @@ void Console::connect()
    client_list = get_list(".clients");
    fileset_list = get_list(".filesets");
    messages_list = get_list(".messages");
-   messages_list = get_list(".pools");
-   messages_list = get_list(".storages");
-   messages_list = get_list(".types");
-   messages_list = get_list(".levels");
+   pool_list = get_list(".pools");
+   storage_list = get_list(".storage");
+   type_list = get_list(".types");
+   level_list = get_list(".levels");
 
    mainWin->set_status(_(" Connected"));
    return;
@@ -173,6 +173,7 @@ QStringList Console::get_list(char *cmd)
       list << msg();
    }
    setEnabled(true);
+   list.sort();
    return list;
 }
 
diff --git a/bacula/src/qt-console/label.ui b/bacula/src/qt-console/label.ui
deleted file mode 100644 (file)
index 94363ca..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-<ui version="4.0" >
- <class>labelVolume</class>
- <widget class="QDialog" name="labelVolume" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>400</width>
-    <height>300</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Label</string>
-  </property>
-  <layout class="QVBoxLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
-   <property name="spacing" >
-    <number>6</number>
-   </property>
-   <item>
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>71</width>
-         <height>21</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QLabel" name="label" >
-       <property name="maximumSize" >
-        <size>
-         <width>16777215</width>
-         <height>30</height>
-        </size>
-       </property>
-       <property name="text" >
-        <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
-p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
-&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:12pt; font-weight:600;">Label a Volume&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>81</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Maximum</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>20</width>
-       <height>10</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item>
-    <layout class="QGridLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item row="3" column="1" >
-      <widget class="QSpinBox" name="slotSpin" >
-       <property name="maximum" >
-        <number>10000</number>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0" >
-      <widget class="QLabel" name="label_3" >
-       <property name="text" >
-        <string>Pool:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>poolCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="0" >
-      <widget class="QLabel" name="label_2" >
-       <property name="text" >
-        <string>Storage:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>storageCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1" >
-      <widget class="QLineEdit" name="volumeName" >
-       <property name="minimumSize" >
-        <size>
-         <width>200</width>
-         <height>0</height>
-        </size>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1" >
-      <widget class="QComboBox" name="poolCombo" />
-     </item>
-     <item row="2" column="0" >
-      <widget class="QLabel" name="label_5" >
-       <property name="text" >
-        <string>Volume Name:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>volumeName</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="1" >
-      <widget class="QComboBox" name="storageCombo" />
-     </item>
-     <item row="3" column="0" >
-      <widget class="QLabel" name="label_4" >
-       <property name="text" >
-        <string>Slot:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>slotSpin</cstring>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Maximum</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>21</width>
-       <height>16</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>labelVolume</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>labelVolume</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/bacula/src/qt-console/label/label.cpp b/bacula/src/qt-console/label/label.cpp
new file mode 100644 (file)
index 0000000..ace4ce9
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+   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.
+*/
+/*
+ *  Label Dialog class
+ *
+ *   Kern Sibbald, February MMVI
+ *
+ */ 
+
+#include "bat.h"
+#include "label.h"
+
+labelDialog::labelDialog(Console *console)
+{
+   setupUi(this);
+   storageCombo->addItems(console->storage_list);
+   poolCombo->addItems(console->pool_list);
+   this->show();
+}
+
+void labelDialog::accept()
+{
+   printf("Storage=%s\n"
+          "Pool=%s\n", 
+           storageCombo->currentText().toUtf8().data(),
+           poolCombo->currentText().toUtf8().data());
+   this->hide();
+
+#ifdef xxx
+   volume  = get_entry_text(label_dialog, "label_entry_volume");
+
+   slot    = get_spin_text(label_dialog, "label_slot");
+
+   if (!pool || !storage || !volume || !(*volume)) {
+      set_status_ready();
+      return;
+   }
+
+   bsnprintf(cmd, sizeof(cmd),
+             "label volume=\"%s\" pool=\"%s\" storage=\"%s\" slot=%s\n", 
+             volume, pool, storage, slot);
+   write_director(cmd);
+   set_text(cmd, strlen(cmd));
+#endif
+}
+
+void labelDialog::reject()
+{
+   printf("Rejected\n");
+   this->hide();
+}
diff --git a/bacula/src/qt-console/label/label.h b/bacula/src/qt-console/label/label.h
new file mode 100644 (file)
index 0000000..7d463c5
--- /dev/null
@@ -0,0 +1,24 @@
+
+#ifndef _LABEL_H_
+#define _LABEL_H_
+
+#include <QtGui>
+#include "ui_label.h"
+#include "console.h"
+
+class labelDialog : public QDialog, public Ui::labelVolume
+{
+   Q_OBJECT 
+
+public:
+   labelDialog(Console *console);
+
+public slots:
+   void accept();
+   void reject();
+
+private:
+
+};
+
+#endif /* _LABEL_H_ */
diff --git a/bacula/src/qt-console/label/label.ui b/bacula/src/qt-console/label/label.ui
new file mode 100644 (file)
index 0000000..94363ca
--- /dev/null
@@ -0,0 +1,226 @@
+<ui version="4.0" >
+ <class>labelVolume</class>
+ <widget class="QDialog" name="labelVolume" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Label</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>71</width>
+         <height>21</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="label" >
+       <property name="maximumSize" >
+        <size>
+         <width>16777215</width>
+         <height>30</height>
+        </size>
+       </property>
+       <property name="text" >
+        <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:12pt; font-weight:600;">Label a Volume&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>81</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Maximum</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>10</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <layout class="QGridLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item row="3" column="1" >
+      <widget class="QSpinBox" name="slotSpin" >
+       <property name="maximum" >
+        <number>10000</number>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="0" >
+      <widget class="QLabel" name="label_3" >
+       <property name="text" >
+        <string>Pool:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>poolCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="0" >
+      <widget class="QLabel" name="label_2" >
+       <property name="text" >
+        <string>Storage:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>storageCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1" >
+      <widget class="QLineEdit" name="volumeName" >
+       <property name="minimumSize" >
+        <size>
+         <width>200</width>
+         <height>0</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1" >
+      <widget class="QComboBox" name="poolCombo" />
+     </item>
+     <item row="2" column="0" >
+      <widget class="QLabel" name="label_5" >
+       <property name="text" >
+        <string>Volume Name:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>volumeName</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1" >
+      <widget class="QComboBox" name="storageCombo" />
+     </item>
+     <item row="3" column="0" >
+      <widget class="QLabel" name="label_4" >
+       <property name="text" >
+        <string>Slot:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>slotSpin</cstring>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Maximum</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>21</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>labelVolume</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>labelVolume</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index 04d666287e0f26cf26b3c1a98d5f02b9cd9deb15..5fb85d455103dd38e5bafe9b8c6805d69e8f6fdb 100644 (file)
@@ -74,6 +74,7 @@ void MainWin::createConnections()
    connect(actionConnect, SIGNAL(triggered()), m_console, SLOT(connect()));
    connect(actionStatusDir, SIGNAL(triggered()), m_console, SLOT(status_dir()));
    connect(actionSelectFont, SIGNAL(triggered()), m_console, SLOT(set_font()));
+   connect(actionLabel, SIGNAL(triggered()), this,  SLOT(labelDialogClicked()));
 }
 
 /* 
@@ -117,8 +118,6 @@ void MainWin::treeItemClicked(QTreeWidgetItem *item, int column)
 }
 
 /*
- * ***FIXME***
- * If item is a Console, then connect it
  */
 void MainWin::treeItemDoubleClicked(QTreeWidgetItem *item, int column)
 {
@@ -130,6 +129,10 @@ void MainWin::treeItemDoubleClicked(QTreeWidgetItem *item, int column)
    }
 }
 
+void MainWin::labelDialogClicked() 
+{
+   new labelDialog(m_console);
+}
 
 
 /*
index 247fa11c6f28da88fe61e13eac4b35509bf46da0..3c4b6c9fb7f73ddd43e97836c2d68d47d14e7897 100644 (file)
@@ -37,6 +37,7 @@
 
 #include <QtGui>
 #include "ui_main.h"
+#include "label/label.h"
 
 class Console;
 
@@ -57,6 +58,7 @@ public slots:
    void about();
    void treeItemClicked(QTreeWidgetItem *item, int column);
    void treeItemDoubleClicked(QTreeWidgetItem *item, int column);
+   void labelDialogClicked();
 
 protected:
    void closeEvent(QCloseEvent *event);