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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
|
/****************************************************************************
** Form implementation generated from reading ui file 'tochartalarmui.ui'
**
** Created by: The User Interface Compiler ($Id: qt/main.cpp 3.3.6 edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "tochartalarmui.h"
#include <qvariant.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "toresultview.h"
/*
* Constructs a toChartAlarmUI as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
toChartAlarmUI::toChartAlarmUI( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "toChartAlarmUI" );
toChartAlarmUILayout = new QGridLayout( this, 1, 1, 11, 6, "toChartAlarmUILayout");
Operation = new QComboBox( FALSE, this, "Operation" );
toChartAlarmUILayout->addWidget( Operation, 0, 2 );
Action = new QComboBox( FALSE, this, "Action" );
toChartAlarmUILayout->addWidget( Action, 3, 2 );
Comparison = new QComboBox( FALSE, this, "Comparison" );
toChartAlarmUILayout->addWidget( Comparison, 1, 2 );
Value = new QLineEdit( this, "Value" );
toChartAlarmUILayout->addWidget( Value, 2, 2 );
TextLabel1 = new QLabel( this, "TextLabel1" );
toChartAlarmUILayout->addWidget( TextLabel1, 0, 1 );
TextLabel2 = new QLabel( this, "TextLabel2" );
toChartAlarmUILayout->addWidget( TextLabel2, 2, 1 );
TextLabel1_2 = new QLabel( this, "TextLabel1_2" );
toChartAlarmUILayout->addWidget( TextLabel1_2, 1, 1 );
TextLabel3 = new QLabel( this, "TextLabel3" );
toChartAlarmUILayout->addWidget( TextLabel3, 3, 1 );
Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2");
Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout2->addItem( Spacer1 );
PushButton1 = new QPushButton( this, "PushButton1" );
PushButton1->setDefault( TRUE );
Layout2->addWidget( PushButton1 );
PushButton2 = new QPushButton( this, "PushButton2" );
Layout2->addWidget( PushButton2 );
toChartAlarmUILayout->addMultiCellLayout( Layout2, 7, 7, 0, 2 );
Charts = new toListView( this, "Charts" );
Charts->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, Charts->sizePolicy().hasHeightForWidth() ) );
Charts->setFocusPolicy( toListView::StrongFocus );
toChartAlarmUILayout->addMultiCellWidget( Charts, 0, 6, 0, 0 );
Spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
toChartAlarmUILayout->addItem( Spacer2, 6, 2 );
Persistent = new QCheckBox( this, "Persistent" );
toChartAlarmUILayout->addMultiCellWidget( Persistent, 5, 5, 1, 2 );
ExtraLabel = new QLabel( this, "ExtraLabel" );
toChartAlarmUILayout->addWidget( ExtraLabel, 4, 1 );
Extra = new QLineEdit( this, "Extra" );
toChartAlarmUILayout->addWidget( Extra, 4, 2 );
languageChange();
resize( QSize(388, 509).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( PushButton2, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect( Action, SIGNAL( activated(int) ), this, SLOT( changeValue(int) ) );
// tab order
setTabOrder( Charts, Operation );
setTabOrder( Operation, Comparison );
setTabOrder( Comparison, Value );
setTabOrder( Value, Action );
setTabOrder( Action, Extra );
setTabOrder( Extra, Persistent );
setTabOrder( Persistent, PushButton1 );
setTabOrder( PushButton1, PushButton2 );
}
/*
* Destroys the object and frees any allocated resources
*/
toChartAlarmUI::~toChartAlarmUI()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void toChartAlarmUI::languageChange()
{
setCaption( tr( "Chart alarm" ) );
Operation->clear();
Operation->insertItem( tr( "Any" ) );
Operation->insertItem( tr( "All" ) );
Operation->insertItem( tr( "Sum" ) );
Operation->insertItem( tr( "Average" ) );
Operation->insertItem( tr( "Max" ) );
Operation->insertItem( tr( "Min" ) );
Action->clear();
Action->insertItem( tr( "Statusmessage" ) );
Action->insertItem( tr( "Email" ) );
Action->insertItem( tr( "Ignore" ) );
Comparison->clear();
Comparison->insertItem( tr( "=" ) );
Comparison->insertItem( tr( "!=" ) );
Comparison->insertItem( tr( "<" ) );
Comparison->insertItem( tr( ">" ) );
Comparison->insertItem( tr( "<=" ) );
Comparison->insertItem( tr( ">=" ) );
TextLabel1->setText( tr( "Operation" ) );
QToolTip::add( TextLabel1, tr( "Operation to perform on the selected columns" ) );
TextLabel2->setText( tr( "Value" ) );
QToolTip::add( TextLabel2, tr( "Value to use in comparison." ) );
TextLabel1_2->setText( tr( "Comparison" ) );
QToolTip::add( TextLabel1_2, tr( "What comparison to do with the result from the above operation." ) );
TextLabel3->setText( tr( "Action" ) );
QToolTip::add( TextLabel3, tr( "What to do when alarm is triggered." ) );
PushButton1->setText( tr( "&Ok" ) );
PushButton2->setText( tr( "Cancel" ) );
Persistent->setText( tr( "Persistent" ) );
QToolTip::add( Persistent, tr( "Remember this alarm when restarting." ) );
ExtraLabel->setText( QString::null );
}
void toChartAlarmUI::changeValue(int)
{
qWarning( "toChartAlarmUI::changeValue(int): Not implemented yet" );
}
|