Sohag Developer PostgreSQL Database Applications

Build Powerful Robust Database Applications

sohag developer Simple Template header file .h

Wed, 07/12/2017 - 16:55 - amr

Simple Template Class Header File .h


#ifndef EMPLOYEES_H
#define EMPLOYEES_H

#include 
#include 

namespace Ui {
class Employees;
}

class Employees : public QWidget
{
    Q_OBJECT

public:
    explicit Employees(QWidget *parent = 0);
    ~Employees();

private:
    Ui::Employees *ui;
    bool insert();
	bool update();

    enum {CreateRecord,EditRecord,DeleteRecord,ChangedStatus,UnChangedStatus,InsertOperation,
          UpdateOperation,RemoveOperation,QueryOperation,SaveOperation};
    QSqlDatabase db;
    int mode; //
    int status;
    void error(QString code,QString errorText,int operation);
    QVariant toVarinat(QString string);
	QString toString(QVariant value);
private slots:
    void clear();
    void save();
    void newRecord();
    void setStatusChanged();
    bool remove();
    bool query();
};

#endif // EMPLOYEES_H

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.