test
authorschutz <schutz@schutz.(none)>
Sat, 7 Aug 2010 19:46:05 +0000 (21:46 +0200)
committerschutz <schutz@schutz.(none)>
Sat, 7 Aug 2010 19:46:05 +0000 (21:46 +0200)
accountdialog.cpp [new file with mode: 0644]
accountdialog.h [new file with mode: 0644]
accountdialog.ui [new file with mode: 0644]
playermainwindow.cpp
scanipdialog.cpp [new file with mode: 0644]
scanipdialog.h [new file with mode: 0644]
scanipdialog.ui [new file with mode: 0644]
vlcRemote.pro

diff --git a/accountdialog.cpp b/accountdialog.cpp
new file mode 100644 (file)
index 0000000..79ad4fb
--- /dev/null
@@ -0,0 +1,34 @@
+#include "accountdialog.h"
+#include "ui_accountdialog.h"
+#include "scanipdialog.h"
+AccountDialog::AccountDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::AccountDialog)
+{
+    ui->setupUi(this);
+    connect(ui->addButton,SIGNAL(clicked()),this,SLOT(addAccount()));
+}
+
+AccountDialog::~AccountDialog()
+{
+    delete ui;
+}
+
+void AccountDialog::changeEvent(QEvent *e)
+{
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+    void AccountDialog::addAccount()
+    {
+
+ScanIPDialog * dialog = new ScanIPDialog(this);
+dialog->show();
+
+    }
diff --git a/accountdialog.h b/accountdialog.h
new file mode 100644 (file)
index 0000000..93c3da0
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef ACCOUNTDIALOG_H
+#define ACCOUNTDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class AccountDialog;
+}
+
+class AccountDialog : public QDialog {
+    Q_OBJECT
+public:
+    explicit AccountDialog(QWidget *parent = 0);
+    ~AccountDialog();
+public slots:
+    void addAccount();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::AccountDialog *ui;
+};
+
+#endif // ACCOUNTDIALOG_H
diff --git a/accountdialog.ui b/accountdialog.ui
new file mode 100644 (file)
index 0000000..87071a5
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AccountDialog</class>
+ <widget class="QDialog" name="AccountDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout">
+   <item>
+    <widget class="QListWidget" name="listWidget"/>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QPushButton" name="addButton">
+       <property name="text">
+        <string>Add</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="editButton">
+       <property name="text">
+        <string>Edit</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="remButton">
+       <property name="text">
+        <string>Remove</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="verticalSpacer">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>40</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index 6955f6e..2e73f8c 100644 (file)
@@ -21,6 +21,7 @@
 #include "ui_playermainwindow.h"
 #include "configdialog.h"
 #include "aboutdialog.h"
+#include "accountdialog.h"
 
 PlayerMainWindow::PlayerMainWindow(QWidget *parent) :
         QMainWindow(parent),
@@ -145,7 +146,7 @@ void PlayerMainWindow::slide(int value)
 
 void PlayerMainWindow::showConfig()
 {
-    ConfigDialog * dialog = new ConfigDialog;
+    AccountDialog * dialog = new AccountDialog;
     dialog->exec();
 }
 void PlayerMainWindow::showAbout()
diff --git a/scanipdialog.cpp b/scanipdialog.cpp
new file mode 100644 (file)
index 0000000..4de0efe
--- /dev/null
@@ -0,0 +1,26 @@
+#include "scanipdialog.h"
+#include "ui_scanipdialog.h"
+
+ScanIPDialog::ScanIPDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::ScanIPDialog)
+{
+    ui->setupUi(this);
+}
+
+ScanIPDialog::~ScanIPDialog()
+{
+    delete ui;
+}
+
+void ScanIPDialog::changeEvent(QEvent *e)
+{
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
diff --git a/scanipdialog.h b/scanipdialog.h
new file mode 100644 (file)
index 0000000..0e3cdf4
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef SCANIPDIALOG_H
+#define SCANIPDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class ScanIPDialog;
+}
+
+class ScanIPDialog : public QDialog {
+    Q_OBJECT
+public:
+    explicit ScanIPDialog(QWidget *parent = 0);
+    ~ScanIPDialog();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::ScanIPDialog *ui;
+};
+
+#endif // SCANIPDIALOG_H
diff --git a/scanipdialog.ui b/scanipdialog.ui
new file mode 100644 (file)
index 0000000..e5aa69a
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ScanIPDialog</class>
+ <widget class="QDialog" name="ScanIPDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>422</width>
+    <height>360</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="0">
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>name</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1">
+        <widget class="QLineEdit" name="lineEdit"/>
+       </item>
+       <item row="1" column="0">
+        <widget class="QLabel" name="label_2">
+         <property name="text">
+          <string>IP</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1">
+        <widget class="QLineEdit" name="lineEdit_2"/>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <widget class="QListWidget" name="listWidget"/>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QPushButton" name="pushButton_2">
+       <property name="text">
+        <string>Scan</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton">
+       <property name="text">
+        <string>Done</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index b1cb5d2..1cfae0e 100644 (file)
@@ -14,19 +14,25 @@ SOURCES += main.cpp\
     playlistmainwindow.cpp \
     playermainwindow.cpp \
     configdialog.cpp \
-    aboutdialog.cpp
+    aboutdialog.cpp \
+    accountdialog.cpp \
+    scanipdialog.cpp
 
 HEADERS += \
     playlistmainwindow.h \
     playermainwindow.h \
     configdialog.h \
-    aboutdialog.h
+    aboutdialog.h \
+    accountdialog.h \
+    scanipdialog.h
 
 FORMS += \
     playlistmainwindow.ui \
     playermainwindow.ui \
     configdialog.ui \
-    aboutdialog.ui
+    aboutdialog.ui \
+    accountdialog.ui \
+    scanipdialog.ui
 
 OTHER_FILES += \
     vlc-remote.desktop