Skip to content

iAttaquer/ContactTo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContactTo

This is a contact manager application that allows you to store and manage contacts in a PostgreSQL database.

Features

  • Store contact details like first name, last name, phone numbers, email, company etc.

  • View a list of all Contacts

    Screenshot 2024-05-02 173721

  • View full details of a contact

    Screenshot 2024-05-02 173858

  • Add new contacts

    Screenshot 2024-05-02 173821

  • Update existing contacts

    Screenshot 2024-05-02 173913

  • Delete contacts

  • Mark contacts as favourites

  • View list of favourite contacts

    Screenshot 2024-05-04 190158

  • Setup connection to database

Usage

The pgDbClient class provides methods to interact with the PostgreSQL database:

  • IsConnection() - Check if connection to database is valid
  • Count() - Get total number of contacts
  • loadShortInfo() - Get list of contacts with ID, first name, last name and phone number
  • loadAllInfo() - Get full details of a contact by ID
  • Is() - Check if a contact exists
  • Add() - Add a new contact
  • Delete() - Delete a contact by ID
  • Update() - Update details of an existing contact
  • CountFavourite() - Get list of favourite contacts
  • loadShortInfoFavourite() - Get list of favourite contacts
  • IsFavourite() - Check if a contact is a favourite
  • AddFavourite() - Mark a contact as favourite
  • DeleteFavourite() - Remove a contact from favourites

The FullContact class represents a contact entity with all details.

The database connection settings like host, database name, user etc. can be configured in pgDbClient.

Database Schema

The contacts are stored in a PostgreSQL database with the following schema:

  • CONTACTS table contains the main contact details
-- Table: public.CONTACTS

-- DROP TABLE IF EXISTS public."CONTACTS";

CREATE TABLE IF NOT EXISTS public."CONTACTS"
(
    "ID" integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ),
    "IMIE" character varying(20) COLLATE pg_catalog."default" NOT NULL,
    "NAZWISKO" character varying(30) COLLATE pg_catalog."default",
    "TELEFON" character varying(15) COLLATE pg_catalog."default",
    "TEL_DOM" character varying(15) COLLATE pg_catalog."default",
    "FIRMA" character varying(30) COLLATE pg_catalog."default",
    "STANOWISKO" character varying(20) COLLATE pg_catalog."default",
    "EMAIL" character varying(30) COLLATE pg_catalog."default",
    "PSEUDONIM" character varying(20) COLLATE pg_catalog."default",
    CONSTRAINT "CONTACTS_pkey" PRIMARY KEY ("ID")
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public."CONTACTS"
    OWNER to postgres;
  • CONTACTS_FAVOURITES table stores the favourite contacts
-- Table: public.ULUBIONE

-- DROP TABLE IF EXISTS public."ULUBIONE";

CREATE TABLE IF NOT EXISTS public."ULUBIONE"
(
    "ID" integer
)

TABLESPACE pg_default;

ALTER TABLE IF EXISTS public."ULUBIONE"
    OWNER to postgres;

Dependencies

  • libpqxx - C++ interface to PostgreSQL
  • Qt - C++ framework to make GUI

This project is licensed under the LGPLv3 license - see the LICENSE.LGPL file for details.

About

Contact manager application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages