Skip to content

Commit

Permalink
Added devices images on the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
topiga committed Nov 4, 2024
1 parent dca4234 commit 1456b48
Show file tree
Hide file tree
Showing 171 changed files with 325 additions and 174 deletions.
13 changes: 7 additions & 6 deletions LiniTunes/idevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void iDevice::_get_basic_info() {
if (lockdownd_get_value(_client, NULL, "ProductType", &tmp_product_type) == LOCKDOWN_E_SUCCESS) {
plist_get_string_val(tmp_product_type, &this->_product_type);
qDebug("ProductType: %s", this->_product_type);
QThread::msleep(100);
} else {
qDebug("Failed to get device product type");
}
Expand Down Expand Up @@ -228,12 +229,12 @@ QString iDevice::storage_left() {

QString iDevice::device_image()
{
if (QFile::exists(":/images/Devices/"+this->product_type()+".png")) {
return QString("/images/Devices/"+this->product_type()+".png");
} else if (QFile::exists(":/images/Devices/"+this->device_class()+"Generic.png")) {
return QString("/images/Devices/"+this->device_class()+"Generic.png");
} else if (QFile::exists(":/images/Devices/Generic.png")) {
return QString("/images/Devices/Generic.png");
if (QFile::exists(":/images/devices/"+this->product_type()+".png")) {
return QString("/images/devices/"+this->product_type()+".png");
} else if (QFile::exists(":/images/devices/"+this->device_class()+"Generic.png")) {
return QString("/images/devices/"+this->device_class()+"Generic.png");
} else if (QFile::exists(":/images/devices/Generic.png")) {
return QString("/images/devices/Generic.png");
}
// return QString("/images/iDevice/iDevice_light_90x90.png");
return QString("/images/iphone.png");
Expand Down
1 change: 1 addition & 0 deletions LiniTunes/idevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <libimobiledevice/lockdown.h>
#include <plist/plist.h>
#include <QFile>
#include <QThread>

class iDevice : public QObject
{
Expand Down
Binary file removed LiniTunes/images/Files/Files_black_30x30.png
Binary file not shown.
Binary file removed LiniTunes/images/Files/Files_dark_30x30.png
Binary file not shown.
Binary file removed LiniTunes/images/Files/Files_light_30x30.png
Binary file not shown.
Binary file removed LiniTunes/images/Files/Files_white_30x30.png
Binary file not shown.
Binary file removed LiniTunes/images/General/General_black_30x30.png
Binary file not shown.
Binary file removed LiniTunes/images/General/General_dark_30x30.png
Binary file not shown.
Binary file removed LiniTunes/images/General/General_light_30x30.png
Binary file not shown.
Binary file removed LiniTunes/images/General/General_white_30x30.png
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
26 changes: 15 additions & 11 deletions LiniTunes/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ Window {
right: parent.right
rightMargin: 8
}
source: "../images/develop_arrow.png"
source: "../images/glyphs/develop_arrow.png"
fillMode: Image.PreserveAspectFit
states: [ State {
name: "normal"
Expand Down Expand Up @@ -798,8 +798,12 @@ Window {
if (device_name_text.text != DeviceWatcher.device_name) {
device_name_text.text = DeviceWatcher.device_name
}
if (current_device_image.source != DeviceWatcher.device_image) {
current_device_image.source = DeviceWatcher.device_image
}
} else {
device_name_text.text = "No device connected"
current_device_image.source = "/images/iphone.png"
}
}
}
Expand Down Expand Up @@ -1473,7 +1477,7 @@ Window {
bottomMargin: 8
topMargin: 8
}
source: "../images/settings.png"
source: "../images/glyphs/settings.png"
fillMode: Image.PreserveAspectFit
}

Expand Down Expand Up @@ -1558,7 +1562,7 @@ Window {
leftMargin: 8
bottomMargin: 8
}
source: "../images/music.png"
source: "../images/glyphs/music.png"
fillMode: Image.PreserveAspectFit
}

Expand Down Expand Up @@ -1642,7 +1646,7 @@ Window {
leftMargin: 8
bottomMargin: 8
}
source: "../images/movies.png"
source: "../images/glyphs/movies.png"
fillMode: Image.PreserveAspectFit
}

Expand Down Expand Up @@ -1728,7 +1732,7 @@ Window {
leftMargin: 8
bottomMargin: 8
}
source: "../images/tv.png"
source: "../images/glyphs/tv.png"
fillMode: Image.PreserveAspectFit
}

Expand Down Expand Up @@ -1815,7 +1819,7 @@ Window {
leftMargin: 8
bottomMargin: 8
}
source: "../images/podcast.png"
source: "../images/glyphs/podcast.png"
fillMode: Image.PreserveAspectFit
}

Expand Down Expand Up @@ -1900,7 +1904,7 @@ Window {
leftMargin: 8
bottomMargin: 8
}
source: "../images/audiobook.png"
source: "../images/glyphs/audiobook.png"
fillMode: Image.PreserveAspectFit
}

Expand Down Expand Up @@ -1986,7 +1990,7 @@ Window {
leftMargin: 8
bottomMargin: 8
}
source: "../images/book.png"
source: "../images/glyphs/book.png"
fillMode: Image.PreserveAspectFit
}

Expand Down Expand Up @@ -2073,7 +2077,7 @@ Window {
leftMargin: 8
bottomMargin: 8
}
source: "../images/photo.png"
source: "../images/glyphs/photo.png"
fillMode: Image.PreserveAspectFit
}

Expand Down Expand Up @@ -2157,7 +2161,7 @@ Window {
leftMargin: 8
bottomMargin: 8
}
source: "../images/folder.png"
source: "../images/glyphs/folder.png"
fillMode: Image.PreserveAspectFit
}

Expand Down Expand Up @@ -2213,7 +2217,7 @@ Window {
height: 21
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
source: "../images/settings.png"
source: "../images/glyphs/settings.png"
fillMode: Image.PreserveAspectFit
sourceSize.height: app_settings_button_image.height
sourceSize.width: app_settings_button_image.width
Expand Down
1 change: 0 additions & 1 deletion LiniTunes/qmldir

This file was deleted.

Loading

0 comments on commit 1456b48

Please sign in to comment.