Skip to content

Commit 8c9a719

Browse files
Merge pull request #61 from Anna-/smallFixes
#LED и #путь сверху в "Файлах"
2 parents f025930 + 0807342 commit 8c9a719

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

trikControl/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Use it if JCx ports are configured to work as PWM signal generators.
196196
<playMp3File command="cvlc --quiet &quot;%1&quot; &amp;" />
197197

198198
<!-- Device files and on/off values for LED on a brick. -->
199-
<led green="/sys/class/leds/led_green/brightness" red="/sys/class/leds/led_red/brightness" on="0" off="1" />
199+
<led green="/sys/class/leds/led_green/brightness" red="/sys/class/leds/led_red/brightness" on="1" off="0" />
200200

201201
<!--Device file for keys on a brick -->
202202
<keys deviceFile="/dev/input/event0" />

trikGui/fileManagerWidget.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,21 @@ void FileManagerWidget::keyPressEvent(QKeyEvent *event)
9696
}
9797
}
9898

99+
QString FileManagerWidget::showCurrentPath()
100+
{
101+
QString result = QDir::currentPath();
102+
result.remove(mRootDirPath);
103+
104+
if (result.isEmpty()) {
105+
result = "/";
106+
}
107+
108+
return result;
109+
}
110+
99111
void FileManagerWidget::showCurrentDir()
100112
{
101-
mCurrentPathLabel.setText(QDir::currentPath());
113+
mCurrentPathLabel.setText(showCurrentPath());
102114

103115
QDir::Filters filters = mFileSystemModel.filter();
104116
if (QDir::currentPath() == mRootDirPath) {

trikGui/fileManagerWidget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ private slots:
6262
private:
6363
void showCurrentDir();
6464
void open();
65+
QString showCurrentPath();
6566

6667
QVBoxLayout mLayout;
6768
QLabel mCurrentPathLabel;

0 commit comments

Comments
 (0)