File: CStats.cpp

package info (click to toggle)
unixodbc 2.2.14p2-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 14,628 kB
  • ctags: 12,533
  • sloc: ansic: 104,243; cpp: 38,571; sh: 15,958; makefile: 2,727; sql: 1
file content (53 lines) | stat: -rw-r--r-- 1,427 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "CStats.h"

#include "stats.xpm"

CStats::CStats( QWidget* parent, const char* name )
    : QWidget( parent, name, 0 )
{
    QVBoxLayout *   playoutTop;
    QBoxLayout *    playoutContent;
    QBoxLayout  *   playoutHelp;
    QFrame *        pframeHelp;
    QLabel *        plabelIcon;
    QLabel *        plabelHelp;

    playoutTop      = new QVBoxLayout( this, 5 );

    // main frame
    playoutContent  = new QHBoxLayout( playoutTop, 5 );
    pSummary        = new CStatSummary( this );
    pDetails        = new CStatDetails( this );
    playoutContent->addWidget( pSummary );
    playoutContent->addWidget( pDetails );

    // help frame
    pframeHelp      = new QFrame( this, "pframeHelp" );
    pframeHelp->setFrameStyle( QFrame::Box | QFrame::Raised );

    playoutTop->addWidget( pframeHelp );

    // help text
    playoutHelp     = new QHBoxLayout( pframeHelp, 5 );

    plabelIcon = new QLabel( pframeHelp, "Label_2" );
    plabelIcon->setPixmap( xpmStats );

    plabelHelp = new QLabel( pframeHelp, "Label_1" );
    plabelHelp->setText( "These are the number of active ODBC; environments, connections, statements and descriptors." );
#ifdef QT_V4LAYOUT
    plabelHelp->setAlignment( Qt::AlignLeft | Qt::WordBreak );
#else
    plabelHelp->setAlignment( AlignLeft | WordBreak );
#endif

    playoutHelp->addWidget( plabelIcon );
    playoutHelp->addWidget( plabelHelp, 10 );
}

CStats::~CStats()
{
}