v0.6.3 Dark Mode
This commit is contained in:
parent
06499466be
commit
66e5c33b00
56 changed files with 1869 additions and 1283 deletions
|
@ -53,6 +53,19 @@ QString FILESYSTEM::Directory() const
|
|||
return m_Directory;
|
||||
}
|
||||
|
||||
void FILESYSTEM::setVisibility(bool Visibility)
|
||||
{
|
||||
if (Visibility!=m_Visibility) {
|
||||
m_Visibility = Visibility;
|
||||
emit visibilityChanged();
|
||||
}
|
||||
}
|
||||
|
||||
bool FILESYSTEM::Visibility()
|
||||
{
|
||||
return m_Visibility;
|
||||
}
|
||||
|
||||
QString FILESYSTEM::homePath() const
|
||||
{
|
||||
//QDir dir(m_Directory);
|
||||
|
@ -135,3 +148,42 @@ QFileInfoList FILESYSTEM::fileList()
|
|||
//qDebug() << "filelist " << m_Filelist;
|
||||
return dir.entryInfoList();
|
||||
}
|
||||
|
||||
|
||||
bool FILESYSTEM::isAutostart() {
|
||||
QFileInfo check_file(QDir::homePath() + "/.config/autostart/friendiqa.desktop");
|
||||
|
||||
if (check_file.exists() && check_file.isFile()) {
|
||||
qDebug()<<"autostart "<<true;
|
||||
return true;
|
||||
}
|
||||
qDebug()<<"autostart "<<false;
|
||||
return false;
|
||||
}
|
||||
|
||||
void FILESYSTEM::setAutostart(bool autostart) {
|
||||
QString path = QDir::homePath() + "/.config/autostart/";
|
||||
QString name ="friendiqa.desktop";
|
||||
QFile file(path+name);
|
||||
|
||||
file.remove();
|
||||
|
||||
if(autostart) {
|
||||
QDir dir(path);
|
||||
if(!dir.exists()) {
|
||||
dir.mkpath(path);
|
||||
}
|
||||
|
||||
if (file.open(QIODevice::ReadWrite)) {
|
||||
QTextStream stream(&file);
|
||||
stream << "[Desktop Entry]" << Qt::endl;
|
||||
stream << "Name=Friendiqa" << Qt::endl;
|
||||
stream << "Exec=friendiqa -background %u" << Qt::endl;
|
||||
stream << "Terminal=false" << Qt::endl;
|
||||
stream << "Icon=Friendiqa.svg" << Qt::endl;
|
||||
stream << "Type=Application" << Qt::endl;
|
||||
stream << "StartupNotify=false" << Qt::endl;
|
||||
stream << "X-GNOME-Autostart-enabled=true" << Qt::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue