diff --git a/client/.idea/.name b/client/.idea/.name
new file mode 100644
index 0000000..2a11f8b
--- /dev/null
+++ b/client/.idea/.name
@@ -0,0 +1 @@
+client
\ No newline at end of file
diff --git a/client/.idea/client.iml b/client/.idea/client.iml
new file mode 100644
index 0000000..d0876a7
--- /dev/null
+++ b/client/.idea/client.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/.idea/encodings.xml b/client/.idea/encodings.xml
new file mode 100644
index 0000000..d821048
--- /dev/null
+++ b/client/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/client/.idea/misc.xml b/client/.idea/misc.xml
new file mode 100644
index 0000000..d638459
--- /dev/null
+++ b/client/.idea/misc.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/.idea/modules.xml b/client/.idea/modules.xml
new file mode 100644
index 0000000..0742ebc
--- /dev/null
+++ b/client/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/.idea/scopes/scope_settings.xml b/client/.idea/scopes/scope_settings.xml
new file mode 100644
index 0000000..922003b
--- /dev/null
+++ b/client/.idea/scopes/scope_settings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/client/.idea/vcs.xml b/client/.idea/vcs.xml
new file mode 100644
index 0000000..6564d52
--- /dev/null
+++ b/client/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/.idea/workspace.xml b/client/.idea/workspace.xml
new file mode 100644
index 0000000..5430d14
--- /dev/null
+++ b/client/.idea/workspace.xml
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1427718256089
+
+ 1427718256089
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/view/.idea/.name b/client/view/.idea/.name
new file mode 100644
index 0000000..e99de0e
--- /dev/null
+++ b/client/view/.idea/.name
@@ -0,0 +1 @@
+view
\ No newline at end of file
diff --git a/client/view/.idea/encodings.xml b/client/view/.idea/encodings.xml
new file mode 100644
index 0000000..d821048
--- /dev/null
+++ b/client/view/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/client/view/.idea/misc.xml b/client/view/.idea/misc.xml
new file mode 100644
index 0000000..d638459
--- /dev/null
+++ b/client/view/.idea/misc.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/view/.idea/modules.xml b/client/view/.idea/modules.xml
new file mode 100644
index 0000000..efd6cfd
--- /dev/null
+++ b/client/view/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/view/.idea/scopes/scope_settings.xml b/client/view/.idea/scopes/scope_settings.xml
new file mode 100644
index 0000000..922003b
--- /dev/null
+++ b/client/view/.idea/scopes/scope_settings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/client/view/.idea/vcs.xml b/client/view/.idea/vcs.xml
new file mode 100644
index 0000000..6564d52
--- /dev/null
+++ b/client/view/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/view/.idea/view.iml b/client/view/.idea/view.iml
new file mode 100644
index 0000000..d0876a7
--- /dev/null
+++ b/client/view/.idea/view.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/view/.idea/workspace.xml b/client/view/.idea/workspace.xml
new file mode 100644
index 0000000..00fcaff
--- /dev/null
+++ b/client/view/.idea/workspace.xml
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1427726528730
+
+ 1427726528730
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/view/__pycache__/mainWindow.cpython-34.pyc b/client/view/__pycache__/mainWindow.cpython-34.pyc
new file mode 100644
index 0000000..9c3316f
Binary files /dev/null and b/client/view/__pycache__/mainWindow.cpython-34.pyc differ
diff --git a/client/view/irc.ui b/client/view/irc.ui
deleted file mode 100644
index 06506cc..0000000
--- a/client/view/irc.ui
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
- Dialog
-
-
-
- 0
- 0
- 675
- 540
-
-
-
- Dialog
-
-
-
-
- 500
- 100
- 160
- 361
-
-
-
- -
-
-
-
- 16
- 75
- true
-
-
-
- Nick list
-
-
-
- -
-
-
-
-
-
-
-
- 20
- 140
- 471
- 321
-
-
-
-
-
-
- 20
- 470
- 641
- 61
-
-
-
- -
-
-
- -
-
-
- Send message
-
-
-
-
-
-
-
-
- 20
- 30
- 641
- 41
-
-
-
- -
-
-
- -
-
-
- Connect
-
-
-
- -
-
-
- Disconnect
-
-
-
-
-
-
-
-
- 20
- 90
- 471
- 41
-
-
-
- -
-
-
- Disable
-
-
-
- -
-
-
- Enable
-
-
-
-
-
-
-
-
-
diff --git a/client/view/irc.py b/client/view/mainWindow.py
similarity index 59%
rename from client/view/irc.py
rename to client/view/mainWindow.py
index d92144b..121af1f 100644
--- a/client/view/irc.py
+++ b/client/view/mainWindow.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file 'irc.ui'
+# Form implementation generated from reading ui file 'mainWindow.ui'
#
-# Created: Mon Mar 30 12:18:37 2015
+# Created: Mon Mar 30 21:05:16 2015
# by: PyQt4 UI code generator 4.11.3
#
# WARNING! All changes made in this file will be lost!
@@ -26,9 +26,9 @@ except AttributeError:
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName(_fromUtf8("Dialog"))
- Dialog.resize(675, 540)
+ Dialog.resize(774, 540)
self.verticalLayoutWidget = QtGui.QWidget(Dialog)
- self.verticalLayoutWidget.setGeometry(QtCore.QRect(500, 100, 160, 361))
+ self.verticalLayoutWidget.setGeometry(QtCore.QRect(600, 100, 160, 361))
self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout.setMargin(0)
@@ -41,14 +41,27 @@ class Ui_Dialog(object):
self.label.setFont(font)
self.label.setObjectName(_fromUtf8("label"))
self.verticalLayout.addWidget(self.label)
- self.listView = QtGui.QListView(self.verticalLayoutWidget)
- self.listView.setObjectName(_fromUtf8("listView"))
- self.verticalLayout.addWidget(self.listView)
- self.listView_2 = QtGui.QListView(Dialog)
- self.listView_2.setGeometry(QtCore.QRect(20, 140, 471, 321))
- self.listView_2.setObjectName(_fromUtf8("listView_2"))
+ self.listNames = QtGui.QListWidget(self.verticalLayoutWidget)
+ self.listNames.setMinimumSize(QtCore.QSize(50, 0))
+ self.listNames.setMaximumSize(QtCore.QSize(200, 16777215))
+ self.listNames.setBaseSize(QtCore.QSize(0, 0))
+ font = QtGui.QFont()
+ font.setFamily(_fromUtf8("Arial"))
+ font.setPointSize(14)
+ font.setItalic(False)
+ font.setStyleStrategy(QtGui.QFont.PreferAntialias)
+ self.listNames.setFont(font)
+ self.listNames.setFocusPolicy(QtCore.Qt.NoFocus)
+ self.listNames.setAcceptDrops(False)
+ self.listNames.setStyleSheet(_fromUtf8(""))
+ self.listNames.setFrameShape(QtGui.QFrame.NoFrame)
+ self.listNames.setFrameShadow(QtGui.QFrame.Sunken)
+ self.listNames.setLineWidth(1)
+ self.listNames.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+ self.listNames.setObjectName(_fromUtf8("listNames"))
+ self.verticalLayout.addWidget(self.listNames)
self.horizontalLayoutWidget = QtGui.QWidget(Dialog)
- self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 470, 641, 61))
+ self.horizontalLayoutWidget.setGeometry(QtCore.QRect(20, 470, 741, 69))
self.horizontalLayoutWidget.setObjectName(_fromUtf8("horizontalLayoutWidget"))
self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setMargin(0)
@@ -60,7 +73,7 @@ class Ui_Dialog(object):
self.pushButton.setObjectName(_fromUtf8("pushButton"))
self.horizontalLayout.addWidget(self.pushButton)
self.horizontalLayoutWidget_2 = QtGui.QWidget(Dialog)
- self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(20, 30, 641, 41))
+ self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(470, 20, 291, 51))
self.horizontalLayoutWidget_2.setObjectName(_fromUtf8("horizontalLayoutWidget_2"))
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_2)
self.horizontalLayout_2.setMargin(0)
@@ -75,7 +88,7 @@ class Ui_Dialog(object):
self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
self.horizontalLayout_2.addWidget(self.pushButton_3)
self.horizontalLayoutWidget_3 = QtGui.QWidget(Dialog)
- self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(20, 90, 471, 41))
+ self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(20, 100, 561, 40))
self.horizontalLayoutWidget_3.setObjectName(_fromUtf8("horizontalLayoutWidget_3"))
self.horizontalLayout_3 = QtGui.QHBoxLayout(self.horizontalLayoutWidget_3)
self.horizontalLayout_3.setMargin(0)
@@ -86,6 +99,28 @@ class Ui_Dialog(object):
self.pushButton_4 = QtGui.QPushButton(self.horizontalLayoutWidget_3)
self.pushButton_4.setObjectName(_fromUtf8("pushButton_4"))
self.horizontalLayout_3.addWidget(self.pushButton_4)
+ self.txtOutput = QtGui.QTextEdit(Dialog)
+ self.txtOutput.setGeometry(QtCore.QRect(20, 160, 561, 291))
+ self.txtOutput.setMinimumSize(QtCore.QSize(400, 0))
+ font = QtGui.QFont()
+ font.setFamily(_fromUtf8("Arial"))
+ font.setPointSize(14)
+ font.setItalic(False)
+ self.txtOutput.setFont(font)
+ self.txtOutput.setFocusPolicy(QtCore.Qt.NoFocus)
+ self.txtOutput.setAcceptDrops(False)
+ self.txtOutput.setFrameShape(QtGui.QFrame.NoFrame)
+ self.txtOutput.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
+ self.txtOutput.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
+ self.txtOutput.setObjectName(_fromUtf8("txtOutput"))
+ self.label_2 = QtGui.QLabel(Dialog)
+ self.label_2.setGeometry(QtCore.QRect(30, 30, 421, 31))
+ font = QtGui.QFont()
+ font.setPointSize(16)
+ font.setBold(True)
+ font.setWeight(75)
+ self.label_2.setFont(font)
+ self.label_2.setObjectName(_fromUtf8("label_2"))
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
@@ -93,9 +128,16 @@ class Ui_Dialog(object):
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(_translate("Dialog", "Dialog", None))
self.label.setText(_translate("Dialog", "Nick list", None))
+ self.listNames.setSortingEnabled(True)
self.pushButton.setText(_translate("Dialog", "Send message", None))
self.pushButton_2.setText(_translate("Dialog", "Connect", None))
self.pushButton_3.setText(_translate("Dialog", "Disconnect", None))
self.pushButton_5.setText(_translate("Dialog", "Disable", None))
self.pushButton_4.setText(_translate("Dialog", "Enable", None))
+ self.txtOutput.setHtml(_translate("Dialog", "\n"
+"
\n"
+"
", None))
+ self.label_2.setText(_translate("Dialog", "Welcome to DNC", None))
diff --git a/client/view/mainWindow.ui b/client/view/mainWindow.ui
new file mode 100644
index 0000000..b7cff32
--- /dev/null
+++ b/client/view/mainWindow.ui
@@ -0,0 +1,241 @@
+
+
+ Dialog
+
+
+
+ 0
+ 0
+ 774
+ 540
+
+
+
+ Dialog
+
+
+
+
+ 600
+ 100
+ 160
+ 361
+
+
+
+ -
+
+
+
+ 16
+ 75
+ true
+
+
+
+ Nick list
+
+
+
+ -
+
+
+
+ 50
+ 0
+
+
+
+
+ 200
+ 16777215
+
+
+
+
+ 0
+ 0
+
+
+
+
+ Arial
+ 14
+ false
+ PreferAntialias
+
+
+
+ Qt::NoFocus
+
+
+ false
+
+
+
+
+
+ QFrame::NoFrame
+
+
+ QFrame::Sunken
+
+
+ 1
+
+
+ Qt::ScrollBarAlwaysOff
+
+
+ true
+
+
+
+
+
+
+
+
+ 20
+ 470
+ 741
+ 69
+
+
+
+ -
+
+
+ -
+
+
+ Send message
+
+
+
+
+
+
+
+
+ 470
+ 20
+ 291
+ 51
+
+
+
+ -
+
+
+ -
+
+
+ Connect
+
+
+
+ -
+
+
+ Disconnect
+
+
+
+
+
+
+
+
+ 20
+ 100
+ 561
+ 40
+
+
+
+ -
+
+
+ Disable
+
+
+
+ -
+
+
+ Enable
+
+
+
+
+
+
+
+
+ 20
+ 160
+ 561
+ 291
+
+
+
+
+ 400
+ 0
+
+
+
+
+ Arial
+ 14
+ false
+
+
+
+ Qt::NoFocus
+
+
+ false
+
+
+ QFrame::NoFrame
+
+
+ Qt::ScrollBarAlwaysOn
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Arial'; font-size:14pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Inconsolata';"><br /></p></body></html>
+
+
+ Qt::TextBrowserInteraction
+
+
+
+
+
+ 30
+ 30
+ 421
+ 31
+
+
+
+
+ 16
+ 75
+ true
+
+
+
+ Welcome to DNC
+
+
+
+
+
+
diff --git a/client/view/start.py b/client/view/start.py
index f1709dc..3435771 100644
--- a/client/view/start.py
+++ b/client/view/start.py
@@ -1,5 +1,7 @@
-from irc import Ui_Dialog
+from mainWindow import Ui_Dialog
from PyQt4 import QtGui, QtCore
+import datetime
+import time
class start(QtGui.QDialog):
@@ -7,22 +9,60 @@ class start(QtGui.QDialog):
super(start, self).__init__()
self.createWidgets()
+ def getTimeStamp(self):
+ return ('[%s] ' % str(datetime.datetime.fromtimestamp(int(time.time())).strftime('%H:%M')))
+
+
+ def ShowMessageAsText( self, txt ):
+ self.message_buffer += '\n' + self.getTimeStamp() + txt
+
+
def createWidgets(self):
self.ui = Ui_Dialog()
self.ui.setupUi(self)
- #self.connectActions()
+
+ self.message_buffer = ""
+ self.ShowMessageAsText("coucou ! comment ça va ?")
+ self.ShowMessageAsText("ce site est une turie !")
+ self.ShowMessageAsText("super et toi ?")
+ self.ShowMessageAsText("Yo les poulets !")
+ self.ShowMessageAsText("coucou ! comment ça va ?")
+ self.ShowMessageAsText("ce site est une turie !")
+ self.ShowMessageAsText("super et toi ?")
+ self.ShowMessageAsText("Yo les poulets !")
+ self.ShowMessageAsText("coucou ! comment ça va ?")
+ self.ShowMessageAsText("ce site est une turie !")
+ self.ShowMessageAsText("super et toi ?")
+ self.ShowMessageAsText("Yo les poulets !")
+ self.ShowMessageAsText("coucou ! comment ça va ?")
+ self.ShowMessageAsText("ce site est une turie !")
+ self.ShowMessageAsText("super et toi ?")
+ self.ShowMessageAsText("Yo les poulets !")
+ self.ShowMessageAsText("coucou ! comment ça va ?")
+ self.ShowMessageAsText("ce site est une turie !")
+ self.ShowMessageAsText("super et toi ?")
+ self.ShowMessageAsText("Yo les poulets !")
+ self.ShowMessageAsText("coucou ! comment ça va ?")
+ self.ShowMessageAsText("ce site est une turie !")
+ self.ShowMessageAsText("super et toi ?")
+ self.ShowMessageAsText("Yo les poulets !")
+
+
+ #self.UpdateMainDisplay()
+
+ self.ui.txtOutput.setText(self.message_buffer)
def connectActions(self):
self.ui.pushButton_2.clicked.connect(self.admin)
self.ui.pushButton.clicked.connect(self.client)
- def admin(self):
- self.hide()
- self.admin = mainAdmin(self)
- def client(self):
- self.hide()
- self.admin = mainUtilisateur(self)
+
+
+
+ #def client(self):
+ # self.hide()
+ # self.admin = mainUtilisateur(self)
if __name__ == "__main__":