~ubuntu-branches/debian/sid/unixodbc/sid

« back to all changes in this revision

Viewing changes to odbcinstQ/CPropertiesFrame.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2004-10-15 03:07:52 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041015030752-dzw4vhxlgycz3woj
Tags: 2.2.4-11
Brown paper bag me: conflicts do not write themselves just because
you add a line to the changelog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        : QDialog( parent, name, true )
17
17
{
18
18
    setSizeGripEnabled( true );
 
19
    QGridLayout *playoutTop  = new QGridLayout( this, 2, 1 );
 
20
    playoutTop->setSpacing( 5 );
 
21
    playoutTop->setMargin( 5 );
 
22
 
19
23
    pProperties = new CProperties( this, 0, hTheFirstProperty );
20
 
    pProperties->show();
 
24
    playoutTop->addWidget( pProperties, 0, 0 );
 
25
 
21
26
    connect( pProperties, SIGNAL(Ok()), this, SLOT(doOk()) );
22
27
    connect( pProperties, SIGNAL(Cancel()), this, SLOT(doCancel()) );
 
28
 
 
29
    doLoadState();
23
30
}
24
31
 
25
32
CPropertiesFrame::~CPropertiesFrame()
26
33
{
 
34
    doSaveState();
 
35
}
 
36
 
 
37
void CPropertiesFrame::doLoadState()
 
38
{
 
39
#if QT_VERSION>=300
 
40
    QSettings settings;
 
41
 
 
42
    int nW = settings.readNumEntry( "/unixODBC/CPropertiesFrame/w", geometry().width() );
 
43
    int nH = settings.readNumEntry( "/unixODBC/CPropertiesFrame/h", geometry().height() );
 
44
    resize( nW, nH );
 
45
#endif
 
46
 
 
47
}
 
48
 
 
49
void CPropertiesFrame::doSaveState()
 
50
{
 
51
#if QT_VERSION>=300
 
52
    QSettings settings;
 
53
 
 
54
    settings.writeEntry( "/unixODBC/CPropertiesFrame/w", width() );
 
55
    settings.writeEntry( "/unixODBC/CPropertiesFrame/h", height() );
 
56
#endif
27
57
}
28
58
 
29
59
void CPropertiesFrame::doOk()
36
66
    reject();
37
67
}
38
68
 
39
 
void CPropertiesFrame::resizeEvent( QResizeEvent *p )
40
 
{
41
 
        pProperties->resize( p->size() );
42
 
}
43
69
 
44
70