Browse Source

Corrections de warnings :

- xpm en const char *
- pragmas

Intégration des icones dans les menus et toolbar
master
Maxime Wack 11 years ago
parent
commit
300001a359
9 changed files with 41 additions and 44 deletions
  1. +1
    -0
      CosMoS/config.cpp
  2. +1
    -1
      CosMoS/cosmos.cpp
  3. +33
    -37
      CosMoS/cosmosGUI.cpp
  4. +1
    -1
      CosMoS/icons/correc.xpm
  5. +1
    -1
      CosMoS/icons/export.xpm
  6. +1
    -1
      CosMoS/icons/import.xpm
  7. +1
    -1
      CosMoS/icons/optionsgales.xpm
  8. +1
    -1
      CosMoS/icons/optionsrche.xpm
  9. +1
    -1
      CosMoS/icons/play.xpm

+ 1
- 0
CosMoS/config.cpp View File

@@ -1,4 +1,5 @@
#include "config.h"
#pragma GCC diagnostic ignored "-Wunused-variable"

config::config()
{


+ 1
- 1
CosMoS/cosmos.cpp View File

@@ -13,7 +13,7 @@ cosmosGUI( parent )
fenetre_options->ShowModal();
}

bdd = new class_bdd(fenetre_options->GetConfiguration()->GetDbpath());
bdd = new class_bdd(configuration->GetDbpath());
}

void cosmos::OnImport( wxCommandEvent& event )


+ 33
- 37
CosMoS/cosmosGUI.cpp View File

@@ -6,6 +6,14 @@
///////////////////////////////////////////////////////////////////////////

#include "cosmosGUI.h"
#include "icons/correc.xpm"
#include "icons/export.xpm"
#include "icons/import.xpm"
#include "icons/optionsgales.xpm"
#include "icons/optionsrche.xpm"
#include "icons/play.xpm"

#pragma GCC diagnostic ignored "-Wunused-but-set-variable"

///////////////////////////////////////////////////////////////////////////

@@ -16,57 +24,45 @@ cosmosGUI::cosmosGUI( wxWindow* parent, wxWindowID id, const wxString& title, co
menubar = new wxMenuBar( 0 );
menu_Fichier = new wxMenu();
wxMenuItem* menuitem_Import;
menuitem_Import = new wxMenuItem( menu_Fichier, wxID_OPEN, wxString( wxT("Importer base") ) , wxEmptyString, wxITEM_NORMAL );
#ifdef __WXMSW__
menuitem_Import->SetBitmaps( wxBitmap( wxT("icons/import.png"), wxBITMAP_TYPE_ANY ) );
#elif defined( __WXGTK__ )
menuitem_Import->SetBitmap( wxBitmap( wxT("icons/import.png"), wxBITMAP_TYPE_ANY ) );
#endif
menuitem_Import = new wxMenuItem( menu_Fichier, wxID_OPEN, "Importer base", wxEmptyString, wxITEM_NORMAL );
menuitem_Import->SetBitmaps(wxBitmap(import_xpm));
menu_Fichier->Append( menuitem_Import );
wxMenuItem* menuitem_Export;
menuitem_Export = new wxMenuItem( menu_Fichier, wxID_SAVE, wxString( wxT("Exporter base") ) , wxEmptyString, wxITEM_NORMAL );
#ifdef __WXMSW__
menuitem_Export->SetBitmaps( wxBitmap( wxT("icons/export.png"), wxBITMAP_TYPE_ANY ) );
#elif defined( __WXGTK__ )
menuitem_Export->SetBitmap( wxBitmap( wxT("icons/export.png"), wxBITMAP_TYPE_ANY ) );
#endif
menuitem_Export = new wxMenuItem( menu_Fichier, wxID_SAVE, "Exporter base", wxEmptyString, wxITEM_NORMAL );
menuitem_Export->SetBitmap(wxBitmap(export_xpm));
menu_Fichier->Append( menuitem_Export );
wxMenuItem* m_separator1;
m_separator1 = menu_Fichier->AppendSeparator();
wxMenuItem* menuitem_Quit;
menuitem_Quit = new wxMenuItem( menu_Fichier, wxID_EXIT, wxString( wxT("Quitter") ) , wxEmptyString, wxITEM_NORMAL );
menuitem_Quit = new wxMenuItem( menu_Fichier, wxID_EXIT, "Quitter", wxEmptyString, wxITEM_NORMAL );
menu_Fichier->Append( menuitem_Quit );
menubar->Append( menu_Fichier, wxT("Fichier") );
menubar->Append( menu_Fichier, "Fichier");
menu_Edit = new wxMenu();
wxMenuItem* menuitem_Optionsprog;
menuitem_Optionsprog = new wxMenuItem( menu_Edit, wxID_PROPERTIES, wxString( wxT("Options générales") ) , wxEmptyString, wxITEM_NORMAL );
#ifdef __WXMSW__
menuitem_Optionsprog->SetBitmaps( wxBitmap( wxT("icons/optionsgales.png"), wxBITMAP_TYPE_ANY ) );
#elif defined( __WXGTK__ )
menuitem_Optionsprog->SetBitmap( wxBitmap( wxT("icons/optionsgales.png"), wxBITMAP_TYPE_ANY ) );
#endif
menuitem_Optionsprog = new wxMenuItem( menu_Edit, wxID_PROPERTIES, "Options générales", wxEmptyString, wxITEM_NORMAL );
menuitem_Optionsprog->SetBitmap( wxBitmap(optionsgales_xpm) );
menu_Edit->Append( menuitem_Optionsprog );
menubar->Append( menu_Edit, wxT("Edition") );
menubar->Append( menu_Edit, "Edition");
menu_Aide = new wxMenu();
menubar->Append( menu_Aide, wxT("Aide") );
menubar->Append( menu_Aide, "Aide");
this->SetMenuBar( menubar );
toolbar = this->CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL, wxID_ANY );
toolbar->AddTool( wxID_OPEN, wxT("Importer base"), wxBitmap( wxT("icons/import.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("Importer la base CONSTAT"), wxEmptyString );
toolbar->AddTool( wxID_SAVE, wxT("Exporter base"), wxBitmap( wxT("icons/export.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("Exporter les résultats"), wxEmptyString );
toolbar->AddTool( wxID_OPEN, "Importer base", wxBitmap(import_xpm), wxNullBitmap, wxITEM_NORMAL, "Importer la base CONSTAT", wxEmptyString );
toolbar->AddTool( wxID_SAVE, "Exporter base", wxBitmap(export_xpm), wxNullBitmap, wxITEM_NORMAL, "Exporter les résultats", wxEmptyString );
toolbar->AddSeparator();
toolbar->AddTool( wxID_NEW, wxT("Lancer"), wxBitmap( wxT("icons/play.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("Lancer la recherche"), wxEmptyString );
toolbar->AddTool( wxID_FIND, wxT("Options"), wxBitmap( wxT("icons/optionsrche.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("Options de recherche"), wxEmptyString );
toolbar->AddTool( wxID_NEW, "Lancer", wxBitmap(play_xpm), wxNullBitmap, wxITEM_NORMAL, "Lancer la recherche", wxEmptyString );
toolbar->AddTool( wxID_FIND, "Options", wxBitmap(optionsrche_xpm), wxNullBitmap, wxITEM_NORMAL, "Options de recherche", wxEmptyString );
toolbar->AddSeparator();
toolbar->AddTool( wxID_DUPLICATE, wxT("Corrections"), wxBitmap( wxT("icons/correc.png"), wxBITMAP_TYPE_ANY ), wxNullBitmap, wxITEM_NORMAL, wxT("Ouvrir l'éditeur de corrections"), wxEmptyString );
toolbar->AddTool( wxID_DUPLICATE, "Corrections", wxBitmap(correc_xpm), wxNullBitmap, wxITEM_NORMAL, "Ouvrir l'éditeur de corrections", wxEmptyString );
toolbar->AddSeparator();
searchctrl = new wxSearchCtrl( toolbar, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
#ifndef __WXMAC__
@@ -102,16 +98,16 @@ cosmosGUI::cosmosGUI( wxWindow* parent, wxWindowID id, const wxString& title, co
grid_Consults->EnableDragColMove( false );
grid_Consults->EnableDragColSize( true );
grid_Consults->SetColLabelSize( 30 );
grid_Consults->SetColLabelValue( 0, wxT("Publication ?") );
grid_Consults->SetColLabelValue( 1, wxT("Consultant associé ?") );
grid_Consults->SetColLabelValue( 2, wxT("Publication CHU ?") );
grid_Consults->SetColLabelValue( 3, wxT("N° Dossier") );
grid_Consults->SetColLabelValue( 4, wxT("Nom(s) demandeur(s)") );
grid_Consults->SetColLabelValue( 5, wxT("Prénom(s) demandeur(s)") );
grid_Consults->SetColLabelValue( 6, wxT("Nom(s) responsable(s)") );
grid_Consults->SetColLabelValue( 7, wxT("Thème") );
grid_Consults->SetColLabelValue( 8, wxT("Date dernière consultation") );
grid_Consults->SetColLabelValue( 9, wxT("Résultats") );
grid_Consults->SetColLabelValue( 0, "Publication ?" );
grid_Consults->SetColLabelValue( 1, _T("Consultant associé ?") );
grid_Consults->SetColLabelValue( 2, "Publication CHU ?" );
grid_Consults->SetColLabelValue( 3, "N° Dossier" );
grid_Consults->SetColLabelValue( 4, "Nom(s) demandeur(s)" );
grid_Consults->SetColLabelValue( 5, "Prénom(s) demandeur(s)" );
grid_Consults->SetColLabelValue( 6, "Nom(s) responsable(s)" );
grid_Consults->SetColLabelValue( 7, "Thème" );
grid_Consults->SetColLabelValue( 8, "Date dernière consultation" );
grid_Consults->SetColLabelValue( 9, "Résultats" );
grid_Consults->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Rows


+ 1
- 1
CosMoS/icons/correc.xpm View File

@@ -1,5 +1,5 @@
/* XPM */
static char * correc_xpm[] = {
const char * correc_xpm[] = {
"22 22 188 2",
" c None",
". c #A6A8A4",


+ 1
- 1
CosMoS/icons/export.xpm View File

@@ -1,5 +1,5 @@
/* XPM */
static char * export_xpm[] = {
const char * export_xpm[] = {
"24 24 193 2",
" c None",
". c #B7B7B7",


+ 1
- 1
CosMoS/icons/import.xpm View File

@@ -1,5 +1,5 @@
/* XPM */
static char * import_xpm[] = {
const char * import_xpm[] = {
"24 24 189 2",
" c None",
". c #B7B7B7",


+ 1
- 1
CosMoS/icons/optionsgales.xpm View File

@@ -1,5 +1,5 @@
/* XPM */
static char * optionsgales_xpm[] = {
const char * optionsgales_xpm[] = {
"24 24 80 1",
" c None",
". c #B0B0B0",


+ 1
- 1
CosMoS/icons/optionsrche.xpm View File

@@ -1,5 +1,5 @@
/* XPM */
static char * optionsrche_xpm[] = {
const char * optionsrche_xpm[] = {
"24 24 131 2",
" c None",
". c #477C0D",


+ 1
- 1
CosMoS/icons/play.xpm View File

@@ -1,5 +1,5 @@
/* XPM */
static char * play_xpm[] = {
const char * play_xpm[] = {
"24 24 130 2",
" c None",
". c #548820",


Loading…
Cancel
Save