SoDaRadio-5.0.3-master:8901fb5
Functions
main_sodaradio.cpp File Reference
#include "mainwindow.hpp"
#include <QApplication>
#include <iostream>
#include <QMessageBox>
#include <QStyleFactory>
#include <QTextStream>
#include <QDir>
#include "../common/GuiParams.hxx"
#include <stdlib.h>

Go to the source code of this file.

Functions

static QString ss2QS (const std::string &st)
 simple conversion from std::string to QString... More...
 
static void alertAndExit (const QString &err_msg)
 pop up a notification box and then bail out. More...
 
static void startupServer (const QString &lock_file_name, SoDa::GuiParams &p)
 start the radio server process More...
 
void setupLookNFeel ()
 initialize colors and shades for GUI elements to present a look and feel based on the fusion style, but with dark background. More...
 
bool checkForZombies (const QString &server_lock_filename, const QString &server_socket_base)
 
int main (int argc, char *argv[])
 Start the SoDaRadio GUI app and launch the server process. More...
 

Function Documentation

◆ alertAndExit()

static void alertAndExit ( const QString &  err_msg)
static

pop up a notification box and then bail out.

Parameters
err_msga descriptive message explaining how we got here.

Definition at line 55 of file main_sodaradio.cpp.

Referenced by startupServer().

◆ checkForZombies()

bool checkForZombies ( const QString &  server_lock_filename,
const QString &  server_socket_base 
)

Definition at line 147 of file main_sodaradio.cpp.

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

Start the SoDaRadio GUI app and launch the server process.

Parameters
argccount of command line args
argvvector of command line tokens

Definition at line 190 of file main_sodaradio.cpp.

References checkForZombies(), setupLookNFeel(), and startupServer().

◆ setupLookNFeel()

void setupLookNFeel ( )

initialize colors and shades for GUI elements to present a look and feel based on the fusion style, but with dark background.

code borrowed from https://gist.github.com/skyrpex under his "do whatever you want" license

Definition at line 122 of file main_sodaradio.cpp.

Referenced by main().

◆ ss2QS()

static QString ss2QS ( const std::string &  st)
static

simple conversion from std::string to QString...

Parameters
ststd::string
Returns
a QString corresponding to the input parameter

Definition at line 45 of file main_sodaradio.cpp.

Referenced by startupServer().

◆ startupServer()

static void startupServer ( const QString &  lock_file_name,
SoDa::GuiParams &  p 
)
static

start the radio server process

Parameters
pset of command line parameters, some of which are passed to the server process.

Definition at line 71 of file main_sodaradio.cpp.

References alertAndExit(), and ss2QS().

Referenced by main().