Pages

Monday, May 16, 2016

ChatLAN - A Python Chat Messenger for LAN Using PyQt4 GUI

Overview

This application is designed to enable the users connected to the same Local Area Network(LAN) to chat with each other. It is very simple, easy-to-use and fast app with aesthetic Graphical User Interface(GUI). The users are required to connect to the same LAN using a router or a wifi hotspot to start chatting with other users connected and using this program.

Video Demo:






Platform

Windows 7 / 8 / 10

Features

  • Two-way messaging
  • Multiple user connections at a time
  • Simple and easy-to-use interface
  • Multiple themes available

Download and Install

  1. Download the .RAR archive or .EXE Self-Extracting Archive from the following without source code (16 Mb) or with the soucre code (33 Mb).
  2. Extract the archive in you desired directory.
  3. Open 'ChatLAN.exe' file to execute program.
  4. You are done! Start chatting.

Programming Language

The programming language used in the development of this program is 'Python v3.5' with 'PyQt4' module.

Socket Programming

To send and receive messages, socket programming is done using Python's "socket" module.

GUI(Graphical User Interface)

The GUI is made with PyQt4 which is an excellent module for GUIs. It has pre-defined libraries and classes for basic and advanced GUI modules and widgets. The menus, lists, buttons, message boxes, themes and all of the related stuff is designed in 'Qt Designer' and then coded in PyQt4.

IDE(Integrated Development Environment) Used

'Microsoft Visual Studio Community 2015' with 'Python Tools for Visual Studio'

Structure of Application

The source consists of three modules i.e.
  1. Connection_class containing a class definition "Connection",
  2. gui_classes containing GUI classes' definitions "server_gui", "connect_gui" and "chatWindow_gui", "myName_gui" and "scan_gui"
  3. main which contains "MainWindow" class definition and the main program.

Classes

  1. MainWindow: This class is for the main window which opens when the user executes the program. All other windows and widgets open from this window.
  2. Connection: This class is for a connection set up between a server and a client. Its type is either "server" or "client". According to their types, its instances automatically perform respective functions.
  3. server_gui: This class is for the widget to enable user act as a server and look for another user as a client.
  4. connect_gui: This class is for the widget to enable the user, being a client, to connect to another user acting as a server.
  5. scan_gui: This class is for the widget enable the user (must be host) to scan the ip and the hostnames of connected clients.
  6. myName_gui: This class enable to set your name for the app.

Main Program Window

This is the window which opens at first when the user executes the application and remains till the user exits it. It contains a menu bar, a connected friends' list, a 'Start Chatting' button and a status bar at the bottom.

Menus:

Main window's menu bar has three menus i.e. "Main", "Themes" and "Help".

Your comments and suggestions are warmly welcomed :-)

6 comments:

  1. Hello, is the source code available? We are currently studying PYQT and this is a good test app for me to experiment on. Thanks sir.

    ReplyDelete
    Replies
    1. The post is updated with the source code.
      Regards!

      Delete
  2. Replies
    1. Links are present in the 'Download and Install' section of the post

      Delete

  3. That is a really good tip especially to those new to the blogosphere. Brief but very accurate information… Many thanks for sharing this one. A must read article! paypal.com login

    ReplyDelete
  4. Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too.
    spy whatsapp conversation

    ReplyDelete