diff options
author | Ken Moore <ken@pcbsd.org> | 2015-06-10 15:32:29 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-06-10 15:32:29 -0400 |
commit | 2bb476d52448ddc0833667feb126d7e6f2342b2d (patch) | |
tree | 7facc087a41be4cc16ce1119945470a5fc0ecad5 /lumina-desktop/desktop-plugins | |
parent | Adjust the themes to use the PRIMARY colors instead of the ACCENT colors for ... (diff) | |
download | lumina-2bb476d52448ddc0833667feb126d7e6f2342b2d.tar.gz lumina-2bb476d52448ddc0833667feb126d7e6f2342b2d.tar.bz2 lumina-2bb476d52448ddc0833667feb126d7e6f2342b2d.zip |
Add a new function to LuminaOS: DiskUsage()
This returns the current stats about the available disks on the system (current read/write rates on FreeBSD - not implemented on other OS's yet).
Also use this new function in the systemmonitor desktop plugin.
Diffstat (limited to 'lumina-desktop/desktop-plugins')
-rw-r--r-- | lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp | 6 | ||||
-rw-r--r-- | lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.ui | 60 |
2 files changed, 56 insertions, 10 deletions
diff --git a/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp b/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp index f5bff7b3..0d568a45 100644 --- a/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp +++ b/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.cpp @@ -26,8 +26,9 @@ MonitorWidget::~MonitorWidget(){ void MonitorWidget::LoadIcons(){ ui->tabWidget->setTabIcon(0,LXDG::findIcon("appointment-recurring","") ); //Summary - ui->tabWidget->setTabIcon(1,LXDG::findIcon("cpu","") ); //CPU Log - ui->tabWidget->setTabIcon(2,LXDG::findIcon("media-flash-memory-stick","") ); //Mem Log + ui->tabWidget->setTabIcon(1,LXDG::findIcon("drive-harddisk","") ); //Disk Usage + //ui->tabWidget->setTabIcon(1,LXDG::findIcon("cpu","") ); //CPU Log + //ui->tabWidget->setTabIcon(2,LXDG::findIcon("media-flash-memory-stick","") ); //Mem Log } void MonitorWidget::UpdateStats(){ @@ -43,6 +44,7 @@ void MonitorWidget::UpdateStats(){ ui->progress_mem->setValue(perc); if(perc<0){ ui->progress_mem->setEnabled(false); } //disable this for future checks } + ui->label_diskinfo->setText( LOS::DiskUsage().join("\n") ); //Also perform/update the logs as necessary // -- TO DO -- } diff --git a/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.ui b/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.ui index c3a58017..0c1fd500 100644 --- a/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.ui +++ b/lumina-desktop/desktop-plugins/systemmonitor/MonitorWidget.ui @@ -31,7 +31,7 @@ <property name="currentIndex"> <number>0</number> </property> - <widget class="QWidget" name="tab"> + <widget class="QWidget" name="tab_summary"> <attribute name="title"> <string>Summary</string> </attribute> @@ -80,15 +80,59 @@ </item> </layout> </widget> - <widget class="QWidget" name="tab_2"> + <widget class="QWidget" name="tab_disks"> <attribute name="title"> - <string>CPU Log</string> - </attribute> - </widget> - <widget class="QWidget" name="tab_3"> - <attribute name="title"> - <string>Memory Log</string> + <string>Disk Usage</string> </attribute> + <layout class="QVBoxLayout" name="verticalLayout"> + <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="QScrollArea" name="scrollArea"> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="widgetResizable"> + <bool>true</bool> + </property> + <widget class="QWidget" name="scrollAreaWidgetContents"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>292</width> + <height>90</height> + </rect> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QLabel" name="label_diskinfo"> + <property name="text"> + <string notr="true"/> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + </layout> </widget> </widget> </item> |