Skip to content
Snippets Groups Projects
Commit 2dfbf562 authored by jpbl's avatar jpbl
Browse files

cleanup

parent 9eeb9303
No related branches found
No related tags found
No related merge requests found
SUBDIRS = stund src skins rings
SUBDIRS = stund src skins rings pixmaps
- We need to remove the KDE check
- We need to clean the optimization flags handling.
- We need to cleanup the compilation libs.
\ No newline at end of file
- We need to cleanup the compilation libs.
- We need to get rid of the pa_converters.h and pa_dither.h
- We need to cleanup the -O* handling
\ No newline at end of file
......@@ -29,9 +29,7 @@ sflphone_SOURCES = \
phonegi-bin.h \
voIPLink.h \
sipcall.h \
skin.h \
stun.h \
udp.h
skin.h
......@@ -40,7 +38,7 @@ sflphone_CXXFLAGS = -DPREFIX=\"$(prefix)\" -DPROGSHAREDIR=\"${datadir}/sflphone\
sflphone_LDFLAGS = $(KDE_RPATH) $(all_libraries)
sflphone_LDADD = gui/libguiframework.la audio/libaudio.la ../stund/libstun.la -lpthread
sflphone_LDADD = gui/libguiframework.la audio/libaudio.la ../stund/libstun.la -lpthread
KDE_CXXFLAGS = $(USE_EXCEPTIONS)
......
......@@ -18,6 +18,7 @@ libaudio_la_SOURCES = \
dtmfgenerator.cpp dtmfgenerator.h \
g711.cpp g711.h \
gsmcodec.cpp gsmcodec.h \
pa_converters.h pa_dither.h \
tonegenerator.cpp tonegenerator.h \
ulaw.cpp ulaw.h
......
......@@ -26,10 +26,10 @@
#include <string.h>
#include <iostream>
#include <string>
#include <portaudio.h>
#include "portaudio/pa_common/portaudio.h"
#include "portaudio/pa_common/pa_converters.h"
#include "portaudio/pa_common/pa_dither.h"
#include "pa_converters.h"
#include "pa_dither.h"
#include "../global.h"
......
......@@ -23,7 +23,7 @@
#ifndef _AUDIO_DRIVERS_PORTAUDIO_H
#define _AUDIO_DRIVERS_PORTAUDIO_H
#include "portaudio/pa_common/portaudio.h"
#include <portaudio.h>
#define TABLE_SIZE 360
#define FRAME_PER_BUFFER 160
......
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/
#include <qdir.h>
#include <qstringlist.h>
#include "../../configuration.h"
#include "../../global.h"
#include "../../skin.h"
#include "../../user_cfg.h"
#include "qjlistboxpixmap.h"
#include "qmessagebox.h"
#include "qtGUImainwindow.h"
void ConfigurationPanel::init()
{
// For reading settings at application startup
// List skin choice from "skins" directory
QDir dir(Skin::getPath(QString(SKINDIR)));
if ( !dir.exists() ) {
_debug("\nCannot find 'skins' directory\n");
} else {
dir.setFilter( QDir::Dirs | QDir::NoSymLinks);
dir.setSorting( QDir::Name );
QStringList list;
list = dir.entryList();
for (unsigned int i = 0; i < dir.count(); i++) {
if (list[i] != "." && list[i] != ".." && list[i] != "CVS") {
SkinChoice->insertItem(list[i]);
}
}
}
// List ring choice from "rings" directory
QDir ringdir(Skin::getPath(QString(RINGDIR)));
if ( !ringdir.exists() ) {
printf ("\nCannot find 'rings' directory\n");
} else {
ringdir.setFilter( QDir::Files | QDir::NoSymLinks);
ringdir.setSorting( QDir::Name );
QStringList ringlist;
ringlist = ringdir.entryList();
for (unsigned int i = 0; i < ringdir.count(); i++) {
if (ringlist[i] != "." && ringlist[i] != ".." && ringlist[i] != "CVS") {
ringsChoice->insertItem(ringlist[i]);
}
}
}
// For signalisations tab
fullName->setText(QString(get_config_fields_str(SIGNALISATION, FULL_NAME)));
userPart->setText(QString(get_config_fields_str(SIGNALISATION, USER_PART)));
username->setText(QString(get_config_fields_str(SIGNALISATION, AUTH_USER_NAME)));
password->setText(QString(get_config_fields_str(SIGNALISATION, PASSWORD)));
hostPart->setText(QString(get_config_fields_str(SIGNALISATION, HOST_PART)));
sipproxy->setText(QString(get_config_fields_str(SIGNALISATION, PROXY)));
autoregister->setChecked(get_config_fields_int(SIGNALISATION, AUTO_REGISTER));
playTones->setChecked(get_config_fields_int(SIGNALISATION, PLAY_TONES));
pulseLength->setValue(get_config_fields_int(SIGNALISATION, PULSE_LENGTH));
sendDTMFas->setCurrentItem(get_config_fields_int(SIGNALISATION, SEND_DTMF_AS));
STUNserver->setText(QString(get_config_fields_str(SIGNALISATION, STUN_SERVER)));
((QRadioButton*)stunButtonGroup->find(get_config_fields_int(SIGNALISATION, USE_STUN)))->setChecked(true);
// For audio tab
((QRadioButton*)DriverChoice->find(get_config_fields_int(AUDIO, DRIVER_NAME)))->setChecked(true);
codec1->setCurrentText(QString(get_config_fields_str(AUDIO, CODEC1)));
codec2->setCurrentText(QString(get_config_fields_str(AUDIO, CODEC2)));
codec3->setCurrentText(QString(get_config_fields_str(AUDIO, CODEC3)));
ringsChoice->setCurrentText(QString(get_config_fields_str(AUDIO, RING_CHOICE)));
// For preferences tab
SkinChoice->setCurrentText(QString(get_config_fields_str(
PREFERENCES, SKIN_CHOICE)));
confirmationToQuit->setChecked(get_config_fields_int(
PREFERENCES, CONFIRM_QUIT));
zoneToneChoice->setCurrentText(QString(get_config_fields_str(
PREFERENCES, ZONE_TONE)));
checkedTray->setChecked(get_config_fields_int(
PREFERENCES, CHECKED_TRAY));
voicemailNumber->setText(QString(get_config_fields_str(
PREFERENCES, VOICEMAIL_NUM)));
// Init tab view order
Tab_Signalisations->show();
Tab_Audio->hide();
Tab_Preferences->hide();
Tab_About->hide();
// Set items for QListBox
new QjListBoxPixmap (QjListBoxPixmap::Above,
QPixmap(Skin::getPathPixmap(QString(PIXDIR),QString(PIXMAP_SIGNALISATIONS))), "Signalisation", Menu );
new QjListBoxPixmap (QjListBoxPixmap::Above,
QPixmap(Skin::getPathPixmap(QString(PIXDIR), QString(PIXMAP_AUDIO))) ,
"Audio", Menu );
new QjListBoxPixmap (QjListBoxPixmap::Above,
QPixmap(Skin::getPathPixmap(QString(PIXDIR), QString(PIXMAP_PREFERENCES))),
"Preferences", Menu );
new QjListBoxPixmap (QjListBoxPixmap::Above,
QPixmap(Skin::getPathPixmap(QString(PIXDIR), QString(PIXMAP_ABOUT))),
"About", Menu );
}
// For saving settings at application 'save'
void ConfigurationPanel::saveSlot()
{
Config::set("VoIPLink", "SIP.fullName", string(fullName->text().ascii()));
Config::set("VoIPLink", "SIP.userPart", string(userPart->text().ascii()));
Config::set("VoIPLink", "SIP.username", string(username->text().ascii()));
Config::set("VoIPLink", "SIP.password", string(password->text().ascii()));
Config::set("VoIPLink", "SIP.hostPart", string(hostPart->text().ascii()));
Config::set("VoIPLink", "SIP.proxy", string(sipproxy->text().ascii()));
Config::set("VoIPLink", "SIP.autoregister",autoregister->isChecked());
Config::set("VoIPLink", "DTMF.pulseLength", pulseLength->value());
Config::set("VoIPLink", "DTMF.playTones", playTones->isChecked());
Config::set("VoIPLink", "DTMF.sendDTMFas" , sendDTMFas->currentItem());
Config::set("VoIPLink", "STUN.STUNserver", string(STUNserver->text().ascii()));
Config::set("Audio", "Codecs.codec1", string(codec1->currentText().ascii()));
Config::set("Audio", "Codecs.codec2", string(codec2->currentText().ascii()));
Config::set("Audio", "Codecs.codec3", string(codec3->currentText().ascii()));
if (ringsChoice->currentText() != NULL)
Config::set("Audio", "Rings.ringChoice",
string(ringsChoice->currentText().ascii()));
Config::set("Preferences", "Themes.skinChoice",
string(SkinChoice->currentText().ascii()));
Config::set("Preferences", "Options.zoneToneChoice",
string(zoneToneChoice->currentText().ascii()));
Config::set("Preferences", "Options.confirmQuit",
confirmationToQuit->isChecked());
Config::set("Preferences", "Options.checkedTray", checkedTray->isChecked());
Config::set("Preferences", "Options.voicemailNumber",
string(voicemailNumber->text().ascii()));
#if 0
QMessageBox::information(this, "Save settings",
"You must restart SFLPhone",
QMessageBox::Yes);
#endif
}
// Handle tab view according to current item of listbox
void ConfigurationPanel::changeTabSlot()
{
switch (Menu->currentItem()) {
case 0:
TitleTab->setText("Setup signalisation");
Tab_Signalisations->show();
Tab_Audio->hide();
Tab_Preferences->hide();
Tab_About->hide();
break;
case 1:
TitleTab->setText("Setup audio");
Tab_Signalisations->hide();
Tab_Audio->show();
Tab_Preferences->hide();
Tab_About->hide();
break;
case 2:
TitleTab->setText("Setup preferences");
Tab_Signalisations->hide();
Tab_Audio->hide();
Tab_Preferences->show();
Tab_About->hide();
break;
case 3:
TitleTab->setText("About");
Tab_Signalisations->hide();
Tab_Audio->hide();
Tab_Preferences->hide();
Tab_About->show();
break;
}
}
void ConfigurationPanel::useStunSlot(int id)
{
Config::set("VoIPLink", "STUN.useStun", id);
}
void ConfigurationPanel::applySkinSlot()
{
Config::set("Preferences", "Themes.skinChoice", string(SkinChoice->currentText().ascii()));
}
void ConfigurationPanel::driverSlot(int id)
{
Config::set("Audio", "Drivers.driverName", id);
}
This diff is collapsed.
/****************************************************************************
** Form interface generated from reading ui file 'gui/qt/configurationpanel.ui'
**
** Created: Thu Jun 2 11:14:54 2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef CONFIGURATIONPANEL_H
#define CONFIGURATIONPANEL_H
#include <qvariant.h>
#include <qpixmap.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
class QFrame;
class QPushButton;
class QListBox;
class QListBoxItem;
class QLabel;
class QTabWidget;
class QWidget;
class QGroupBox;
class QLineEdit;
class QCheckBox;
class QButtonGroup;
class QRadioButton;
class QSpinBox;
class QComboBox;
class ConfigurationPanel : public QDialog
{
Q_OBJECT
public:
ConfigurationPanel( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~ConfigurationPanel();
QFrame* line1;
QPushButton* buttonHelp;
QPushButton* buttonSave;
QPushButton* buttonOk;
QPushButton* buttonCancel;
QListBox* Menu;
QLabel* TitleTab;
QFrame* line2;
QTabWidget* Tab_Signalisations;
QWidget* SIPPage;
QGroupBox* groupBox1;
QLabel* textLabel2;
QLineEdit* fullName;
QLineEdit* userPart;
QLabel* textLabel3;
QLabel* textLabel2_3;
QLineEdit* username;
QLineEdit* hostPart;
QLineEdit* sipproxy;
QLabel* textLabel3_2_2;
QLineEdit* password;
QLabel* textLabel1_3;
QLabel* textLabel3_2;
QCheckBox* autoregister;
QPushButton* Register;
QWidget* STUNPage;
QGroupBox* groupBox3;
QLabel* textLabel1_5;
QLineEdit* STUNserver;
QButtonGroup* stunButtonGroup;
QRadioButton* useStunNo;
QRadioButton* useStunYes;
QWidget* DTMFPage;
QGroupBox* SettingsDTMF;
QCheckBox* playTones;
QLabel* labelPulseLength;
QSpinBox* pulseLength;
QLabel* labelSendDTMF;
QComboBox* sendDTMFas;
QTabWidget* Tab_Audio;
QWidget* DriversPage;
QButtonGroup* DriverChoice;
QRadioButton* ossButton;
QRadioButton* alsaButton;
QWidget* CodecsPage;
QButtonGroup* CodecsChoice;
QComboBox* codec1;
QComboBox* codec2;
QComboBox* codec3;
QLabel* textLabel1_4;
QLabel* textLabel1_4_2;
QLabel* textLabel1_4_3;
QWidget* RingPage;
QComboBox* ringsChoice;
QTabWidget* Tab_Preferences;
QWidget* DriversPage_2;
QComboBox* SkinChoice;
QPushButton* buttonApplySkin;
QWidget* TabPage;
QLabel* textLabel1_2;
QComboBox* zoneToneChoice;
QCheckBox* confirmationToQuit;
QCheckBox* checkedTray;
QLabel* textLabel1_6;
QLineEdit* voicemailNumber;
QTabWidget* Tab_About;
QWidget* DriversPage_3;
QLabel* pixmapLabel1;
QLabel* textLabel2_2;
QWidget* CodecsPage_2;
QLabel* textLabel1;
QLabel* pixmapLabel2;
public slots:
virtual void saveSlot();
virtual void changeTabSlot();
virtual void useStunSlot( int id );
virtual void applySkinSlot();
virtual void driverSlot( int id );
protected:
QGridLayout* ConfigurationPanelLayout;
QVBoxLayout* layout19;
QHBoxLayout* layout28;
QSpacerItem* Horizontal_Spacing2;
QVBoxLayout* layout19_2;
QVBoxLayout* layout24;
QGridLayout* groupBox1Layout;
QVBoxLayout* layout23;
QSpacerItem* spacer9;
QHBoxLayout* layout19_3;
QSpacerItem* spacer7;
QVBoxLayout* stunButtonGroupLayout;
QGridLayout* SettingsDTMFLayout;
QVBoxLayout* layout11;
QHBoxLayout* layout10;
QSpacerItem* spacer6;
QHBoxLayout* layout7;
QSpacerItem* spacer3;
QHBoxLayout* layout8;
QSpacerItem* spacer4;
QVBoxLayout* DriverChoiceLayout;
QGridLayout* layout18;
QVBoxLayout* layout17;
QVBoxLayout* layout18_2;
QVBoxLayout* layout17_2;
QHBoxLayout* layout16;
QSpacerItem* spacer5;
QHBoxLayout* layout16_2;
QSpacerItem* spacer6_2;
protected slots:
virtual void languageChange();
private:
QPixmap image0;
QPixmap image1;
void init();
};
#endif // CONFIGURATIONPANEL_H
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/
/****************************************************************************
** Form implementation generated from reading ui file 'url_input.ui'
**
** Created: Thu Jun 9 10:29:29 2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "url_input.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a URL_Input as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
URL_Input::URL_Input( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "URL_Input" );
buttonOK = new QPushButton( this, "buttonOK" );
buttonOK->setGeometry( QRect( 208, -1, 20, 23 ) );
buttonOK->setMinimumSize( QSize( 0, 23 ) );
buttonOK->setMaximumSize( QSize( 20, 23 ) );
buttonOK->setFocusPolicy( QPushButton::StrongFocus );
buttonCancel = new QPushButton( this, "buttonCancel" );
buttonCancel->setGeometry( QRect( 228, -1, 20, 23 ) );
buttonCancel->setMinimumSize( QSize( 0, 23 ) );
buttonCancel->setMaximumSize( QSize( 20, 23 ) );
buttonCancel->setFocusPolicy( QPushButton::TabFocus );
url = new QLineEdit( this, "url" );
url->setGeometry( QRect( -1, 0, 210, 23 ) );
url->setMinimumSize( QSize( 210, 0 ) );
url->setFocusPolicy( QLineEdit::StrongFocus );
languageChange();
resize( QSize(250, 21).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
// tab order
setTabOrder( url, buttonOK );
setTabOrder( buttonOK, buttonCancel );
}
/*
* Destroys the object and frees any allocated resources
*/
URL_Input::~URL_Input()
{
// no need to delete child widgets, Qt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void URL_Input::languageChange()
{
setCaption( tr( "URL_Input" ) );
buttonOK->setText( tr( "1" ) );
buttonOK->setAccel( QKeySequence( QString::null ) );
buttonCancel->setText( tr( "0" ) );
buttonCancel->setAccel( QKeySequence( QString::null ) );
}
/****************************************************************************
** Form interface generated from reading ui file 'gui/qt/url_input.ui'
**
** Created: Thu Jun 2 11:14:54 2005
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef URL_INPUT_H
#define URL_INPUT_H
#include <qvariant.h>
#include <qdialog.h>
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
class QPushButton;
class QLineEdit;
class URL_Input : public QDialog
{
Q_OBJECT
public:
URL_Input( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~URL_Input();
QPushButton* buttonOK;
QPushButton* buttonCancel;
QLineEdit* url;
protected:
protected slots:
virtual void languageChange();
};
#endif // URL_INPUT_H
......@@ -45,7 +45,6 @@
#include "sipvoiplink.h"
#include "skin.h"
#include "voIPLink.h"
#include "../stund/udp.h"
#include "audio/audiodriversportaudio.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment