Git Product home page Git Product logo

chatz-ui's Introduction

Chatz-UI

A simple, python, PyQt4 chat user interface with emoji support

Chatz Screenshot

Dependencies

  1. Python 2.7
  2. emoji
  3. PyQt4

Running

It's as simple as running main.py with the dependencies installed.

Development

When connecting back-end code, make use of the methods (in main.py - UIHandler class):

  1. refresh_users(users) - to refresh the list of participants shown. It takes a dict argument with the following structure:

    users = {username: [user_id, access_level, last-seen_time], ...}

    access_level: 1 = admin, 2 = moderator, 3 = regular user

  2. display_error(text) - to display errors. It takes a str argument with the error text

  3. sendslot() - to send a typed in message in the text_input widget when the send button has been clicked

  4. recvslot(type_, mesg) - to display received messages. It takes an int argument(type_) to determine what kind of message has been received so as to render it correctly, as well as a tuple argument(mesg) containing the message and details:

    mesg = (sender, message, time_sent)

    type_: 1 = message from server, 2 = message from group, 3 = direct message

Tips

This is front-end code meant to be connected to the chat back-end. When doing this, make use of PyQt slots and signals to prevent freezing of the UI.

chatz-ui's People

Contributors

ansh3ll avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.