pgInitialize(parentTreeWidgetItem);
QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/status.png")));
- m_cursor = new QTextCursor(textEdit->document());
+ m_cursor = new QTextCursor(textEditHeader->document());
readSettings();
dockPage();
void ClientStat::getFont()
{
- QFont font = textEdit->font();
+ QFont font = textEditHeader->font();
QString dirname;
m_console->getDirResName(dirname);
font.setPointSize(settings.value("consolePointSize", 10).toInt());
font.setFixedPitch(settings.value("consoleFixedPitch", true).toBool());
settings.endGroup();
- textEdit->setFont(font);
+ textEditHeader->setFont(font);
}
/*
{
QString command = QString(".status client=\"" + m_client + "\" header");
QStringList results;
- textEdit->clear();
+ textEditHeader->clear();
if (m_console->dir_cmd(command, results)) {
foreach (QString line, results) {
line += "\n";
- textEdit->insertPlainText(line);
+ textEditHeader->insertPlainText(line);
}
}
}
}
/*
- * Populate running table
+ * Populate running text
*/
void ClientStat::populateRunning()
{
QString command = QString(".status client=\"" + m_client + "\" running");
Pmsg1(100, "Clients running cmd : %s\n",command.toUtf8().data());
QStringList results;
- QBrush blackBrush(Qt::black);
-
- runningTable->clear();
- QStringList headerlist = (QStringList()
- << tr("Job Id") << tr("Job Level") << tr("Job Data") << tr("Job Info"));
-
- runningTable->setColumnCount(headerlist.size());
- runningTable->setHorizontalHeaderLabels(headerlist);
+ textEditRunning->clear();
if (m_console->dir_cmd(command, results)) {
- int row = 0;
- QTableWidgetItem* p_tableitem;
- runningTable->setRowCount(results.size());
foreach (QString line, results) {
- /* Iterate through the record returned from the query */
- QStringList fieldlist = line.split("\t");
- int column = 0;
- QString statusCode("");
- /* Iterate through fields in the record */
- foreach (QString field, fieldlist) {
- field = field.trimmed(); /* strip leading & trailing spaces */
- p_tableitem = new QTableWidgetItem(field, 1);
- p_tableitem->setForeground(blackBrush);
- p_tableitem->setFlags(0);
- runningTable->setItem(row, column, p_tableitem);
- column += 1;
- }
- row += 1;
+ line += "\n";
+ textEditRunning->insertPlainText(line);
}
}
- runningTable->resizeColumnsToContents();
- runningTable->resizeRowsToContents();
- runningTable->verticalHeader()->hide();
}
/*
{
connect(actionRefresh, SIGNAL(triggered()), this,
SLOT(populateAll()));
- connect(actionCancelRunning, SIGNAL(triggered()), this,
- SLOT(consoleCancelJob()));
-
- runningTable->setContextMenuPolicy(Qt::ActionsContextMenu);
- runningTable->addAction(actionRefresh);
- runningTable->addAction(actionCancelRunning);
}
/*
void ClientStat::readSettings()
{
m_groupText = "ClientStatPage";
- m_splitText = "splitterSizes_0";
+ m_splitText = "splitterSizes_1";
QSettings settings(m_console->m_dir->name(), "bat");
settings.beginGroup(m_groupText);
splitter->restoreState(settings.value(m_splitText).toByteArray());
settings.endGroup();
}
-
-/*
- * Cancel a running job
- */
-void ClientStat::consoleCancelJob()
-{
- int currentrow = runningTable->currentRow();
- QTableWidgetItem *item = runningTable->item(currentrow, 0);
- if (item) {
- QString text = item->text();
- QString cmd("cancel jobid=");
- cmd += text;
- consoleCommand(cmd);
- }
-}
<rect>
<x>0</x>
<y>0</y>
- <width>504</width>
- <height>410</height>
+ <width>618</width>
+ <height>630</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
<layout class="QGridLayout" >
- <property name="leftMargin" >
- <number>9</number>
- </property>
- <property name="topMargin" >
- <number>9</number>
- </property>
- <property name="rightMargin" >
- <number>9</number>
- </property>
- <property name="bottomMargin" >
- <number>9</number>
- </property>
- <property name="horizontalSpacing" >
- <number>6</number>
- </property>
- <property name="verticalSpacing" >
- <number>6</number>
- </property>
<item row="0" column="0" >
<widget class="QSplitter" name="splitter" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <widget class="QTextEdit" name="textEdit" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>200</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>16777215</width>
- <height>100</height>
- </size>
- </property>
- <property name="sizeIncrement" >
- <size>
- <width>1</width>
- <height>0</height>
- </size>
- </property>
- <property name="focusPolicy" >
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="acceptDrops" >
- <bool>false</bool>
- </property>
- <property name="toolTip" >
- <string comment="Joblog Window" />
- </property>
- <property name="statusTip" >
- <string comment="Joblog Window" />
- </property>
- <property name="whatsThis" >
- <string comment="Joblog Window" />
- </property>
- <property name="horizontalScrollBarPolicy" >
- <enum>Qt::ScrollBarAsNeeded</enum>
- </property>
- <property name="autoFormatting" >
- <set>QTextEdit::AutoNone</set>
- </property>
- <property name="tabChangesFocus" >
- <bool>false</bool>
- </property>
- <property name="documentTitle" >
- <string comment="Joblog Window" />
- </property>
- <property name="lineWrapMode" >
- <enum>QTextEdit::NoWrap</enum>
- </property>
- <property name="readOnly" >
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QWidget" name="layoutWidget_2" >
+ <widget class="QWidget" name="" >
<layout class="QVBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
<item>
- <widget class="QLabel" name="runningLabel" >
+ <widget class="QLabel" name="runningLabel_2" >
<property name="layoutDirection" >
<enum>Qt::LeftToRight</enum>
</property>
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:13pt; font-weight:600;">Running Jobs</span></p></body></html></string>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:13pt; font-weight:600;">Header</span></p></body></html></string>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
</widget>
</item>
<item>
- <widget class="QTableWidget" name="runningTable" />
+ <widget class="QTextEdit" name="textEditHeader" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>200</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize" >
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize" >
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="sizeIncrement" >
+ <size>
+ <width>1</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="acceptDrops" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string comment="Joblog Window" />
+ </property>
+ <property name="statusTip" >
+ <string comment="Joblog Window" />
+ </property>
+ <property name="whatsThis" >
+ <string comment="Joblog Window" />
+ </property>
+ <property name="horizontalScrollBarPolicy" >
+ <enum>Qt::ScrollBarAsNeeded</enum>
+ </property>
+ <property name="autoFormatting" >
+ <set>QTextEdit::AutoNone</set>
+ </property>
+ <property name="tabChangesFocus" >
+ <bool>false</bool>
+ </property>
+ <property name="documentTitle" >
+ <string comment="Joblog Window" />
+ </property>
+ <property name="lineWrapMode" >
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
</item>
</layout>
</widget>
- <widget class="QWidget" name="layoutWidget" >
- <layout class="QVBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
- <item>
+ <widget class="QWidget" name="" >
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="runningLabel" >
+ <property name="layoutDirection" >
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text" >
+ <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:13pt; font-weight:600;">Running</span></p></body></html></string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QTextEdit" name="textEditRunning" />
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="" >
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
<widget class="QLabel" name="terminatedLabel" >
<property name="layoutDirection" >
<enum>Qt::LeftToRight</enum>
</property>
</widget>
</item>
- <item>
+ <item row="1" column="0" >
<widget class="QTableWidget" name="terminatedTable" />
</item>
</layout>