mirror of
https://github.com/tnodir/fort
synced 2024-11-15 06:35:23 +00:00
UI: ProgramsWindow: Tweak "End Time" column.
This commit is contained in:
parent
14d521ef38
commit
5b9b770eb8
@ -30,7 +30,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
#define APPS_HEADER_VERSION 2
|
||||
#define APPS_HEADER_VERSION 3
|
||||
|
||||
const ValuesList appBlockInHourValues = {
|
||||
3, 1, 6, 12, 24, 24 * 7, 24 * 30
|
||||
@ -412,11 +412,13 @@ void ProgramsWindow::setupTableAppsHeader()
|
||||
header->setSectionResizeMode(0, QHeaderView::Interactive);
|
||||
header->setSectionResizeMode(1, QHeaderView::Interactive);
|
||||
header->setSectionResizeMode(2, QHeaderView::Interactive);
|
||||
header->setSectionResizeMode(3, QHeaderView::Stretch);
|
||||
header->setSectionResizeMode(3, QHeaderView::Fixed);
|
||||
header->setSectionResizeMode(4, QHeaderView::Stretch);
|
||||
|
||||
header->resizeSection(0, 540);
|
||||
header->resizeSection(0, 600);
|
||||
header->resizeSection(1, 120);
|
||||
header->resizeSection(2, 100);
|
||||
header->resizeSection(3, 30);
|
||||
|
||||
header->setSectionsClickable(true);
|
||||
header->setSortIndicatorShown(true);
|
||||
|
@ -17,6 +17,7 @@
|
||||
<file>images/chart_bar.png</file>
|
||||
<file>images/chart_line.png</file>
|
||||
<file>images/clock.png</file>
|
||||
<file>images/clock_stop.png</file>
|
||||
<file>images/cog.png</file>
|
||||
<file>images/computer-96.png</file>
|
||||
<file>images/control_fastforward.png</file>
|
||||
|
Binary file not shown.
@ -88,8 +88,8 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../model/applistmodel.cpp" line="93"/>
|
||||
<source>End Time</source>
|
||||
<translation>Время окончания</translation>
|
||||
<source>End</source>
|
||||
<translation>Кон.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../model/applistmodel.cpp" line="94"/>
|
||||
@ -246,12 +246,12 @@
|
||||
<context>
|
||||
<name>ConfManager</name>
|
||||
<message>
|
||||
<location filename="../conf/confmanager.cpp" line="316"/>
|
||||
<location filename="../conf/confmanager.cpp" line="332"/>
|
||||
<source>Configuration Error</source>
|
||||
<translation>Ошибка конфигурации</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../conf/confmanager.cpp" line="808"/>
|
||||
<location filename="../conf/confmanager.cpp" line="827"/>
|
||||
<source>Application '%1' already exists</source>
|
||||
<translation>Приложение '%1' уже существует</translation>
|
||||
</message>
|
||||
@ -1119,7 +1119,7 @@
|
||||
<context>
|
||||
<name>TaskInfoZoneDownloader</name>
|
||||
<message>
|
||||
<location filename="../task/taskinfozonedownloader.cpp" line="31"/>
|
||||
<location filename="../task/taskinfozonedownloader.cpp" line="36"/>
|
||||
<source>Zone Addresses Updated!</source>
|
||||
<translation>Адреса зон обновлены!</translation>
|
||||
</message>
|
||||
@ -1228,41 +1228,46 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="81"/>
|
||||
<source>Store Text</source>
|
||||
<translation>Сохранять текст</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="82"/>
|
||||
<source>Custom URL</source>
|
||||
<translation>Нестандартная ссылка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="82"/>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="83"/>
|
||||
<source>URL:</source>
|
||||
<translation>Ссылка:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="83"/>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="84"/>
|
||||
<source>Form Data:</source>
|
||||
<translation>Данные формы:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="84"/>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="85"/>
|
||||
<source>OK</source>
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="85"/>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="86"/>
|
||||
<source>Cancel</source>
|
||||
<translation>Отмена</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="87"/>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="88"/>
|
||||
<source>Edit Zone</source>
|
||||
<translation>Редактирование зоны</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="91"/>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="92"/>
|
||||
<source>Zones</source>
|
||||
<translation>Зоны</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="245"/>
|
||||
<location filename="../form/zone/zoneswindow.cpp" line="251"/>
|
||||
<source>Are you sure to remove selected zone?</source>
|
||||
<translation>Удалить выбранную зону?</translation>
|
||||
</message>
|
||||
|
BIN
src/ui/images/clock_stop.png
Normal file
BIN
src/ui/images/clock_stop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 922 B |
@ -90,7 +90,7 @@ QVariant AppListModel::headerData(int section, Qt::Orientation orientation,
|
||||
case 0: return tr("Program");
|
||||
case 1: return tr("Group");
|
||||
case 2: return tr("State");
|
||||
case 3: return tr("End Time");
|
||||
case 3: return tr("End");
|
||||
case 4: return tr("Creation Time");
|
||||
}
|
||||
}
|
||||
@ -132,8 +132,8 @@ QVariant AppListModel::data(const QModelIndex &index, int role) const
|
||||
if (appRow.blocked) return tr("Block");
|
||||
return tr("Allow");
|
||||
}
|
||||
case 3: return appRow.endTime.isValid()
|
||||
? appRow.endTime : QVariant();
|
||||
case 3: return (role == Qt::DisplayRole || appRow.endTime.isNull())
|
||||
? QVariant() : appRow.endTime;
|
||||
case 4: return appRow.creatTime;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ QVariant AppListModel::data(const QModelIndex &index, int role) const
|
||||
case Qt::DecorationRole: {
|
||||
const int column = index.column();
|
||||
|
||||
if (column == 0 || column == 2) {
|
||||
if (column == 0 || column == 2 || column == 3) {
|
||||
const int row = index.row();
|
||||
const auto appRow = appRowAt(row);
|
||||
|
||||
@ -162,6 +162,9 @@ QVariant AppListModel::data(const QModelIndex &index, int role) const
|
||||
case 2:
|
||||
return appRow.blocked ? QIcon(":/images/stop.png")
|
||||
: QIcon(":/images/arrow_switch.png");
|
||||
case 3:
|
||||
return appRow.endTime.isNull() ? QVariant()
|
||||
: QIcon(":/images/clock_stop.png");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user