source: trunk/examples/sql/overview/table3/main.h

Last change on this file was 202, checked in by rudi, 14 years ago

Added SQL examples

File size: 1.1 KB
Line 
1/****************************************************************************
2** $Id: main.h 2051 2007-02-21 10:04:20Z chehrlic $
3**
4** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
5**
6** This file is part of an example program for Qt. This example
7** program may be used, distributed and modified without limitation.
8**
9*****************************************************************************/
10
11#include <qapplication.h>
12#include <qcombobox.h>
13#include <qmap.h>
14#include <qsqldatabase.h>
15#include <qsqlcursor.h>
16#include <qsqleditorfactory.h>
17#include <qsqlpropertymap.h>
18#include "../connection.h"
19
20class StatusPicker : public QComboBox
21{
22 Q_OBJECT
23 Q_PROPERTY( int statusid READ statusId WRITE setStatusId )
24 public:
25 StatusPicker( QWidget *parent=0, const char *name=0 );
26 int statusId() const;
27 void setStatusId( int id );
28 private:
29 QMap< int, int > index2id;
30};
31
32
33class CustomSqlEditorFactory : public QSqlEditorFactory
34{
35 Q_OBJECT
36 public:
37 QWidget *createEditor( QWidget *parent, const QSqlField *field );
38};
39
40
41
Note: See TracBrowser for help on using the repository browser.