- Timestamp:
- 01/27/10 16:31:10 (13 years ago)
- Branches:
- master, qt5
- Children:
- a790a90
- Parents:
- 07ae23a
- Location:
- src/gui
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/alarmdialog.cpp
r07ae23a r0bb39f5 1 1 #include "alarmdialog.h" 2 #include < appsettings.h>2 #include <conference.h> 3 3 4 4 #include <QApplication> … … 47 47 try 48 48 { 49 Event event = Event::getById(mEventId, AppSettings::confId());49 Event event = Event::getById(mEventId,Conference::activeConference()); 50 50 titleStr = "Event alarm"; 51 51 messageStr = event.title(); … … 89 89 try 90 90 { 91 Event event = Event::getById(mEventId, AppSettings::confId());91 Event event = Event::getById(mEventId,Conference::activeConference()); 92 92 event.setHasAlarm(false); 93 93 event.update("alarm"); -
src/gui/eventdialog.cpp
r07ae23a r0bb39f5 1 1 #include "eventdialog.h" 2 #include < appsettings.h>2 #include <conference.h> 3 3 4 4 #include <QScrollBar> … … 18 18 #endif 19 19 20 Event event = Event::getById(mEventId, AppSettings::confId());20 Event event = Event::getById(mEventId,Conference::activeConference()); 21 21 22 22 title->setText(event.title()); … … 42 42 void EventDialog::favouriteClicked() 43 43 { 44 Event event = Event::getById(mEventId, AppSettings::confId());44 Event event = Event::getById(mEventId,Conference::activeConference()); 45 45 46 46 if(event.isFavourite()) … … 65 65 void EventDialog::alarmClicked() 66 66 { 67 Event event = Event::getById(mEventId, AppSettings::confId());67 Event event = Event::getById(mEventId,Conference::activeConference()); 68 68 69 69 if(event.hasAlarm()) -
src/gui/favtabcontainer.cpp
r07ae23a r0bb39f5 1 /*2 * favtabcontainer.cpp3 *4 * Created on: Jan 27, 20105 * Author: maemo6 */7 1 8 2 #include "favtabcontainer.h" … … 22 16 // we need to reload favourites, because some favourite could be deleted 23 17 //static_cast<EventModel*>(favTreeView->model())->updateModel(aEventId); 24 QDate aStartDate = Conference::getById(AppSettings::confId()).start(); 25 QDate aEndDate = Conference::getById(AppSettings::confId()).end(); 26 dayNavigator->setDates(aStartDate, aEndDate); 27 updateTreeView( Conference::getById(AppSettings::confId()).start() ); 18 int confId = Conference::activeConference(); 19 QDate startDate = Conference::getById(confId).start(); 20 QDate endDate = Conference::getById(confId).end(); 21 dayNavigator->setDates(startDate, endDate); 22 updateTreeView( Conference::getById(confId).start() ); 28 23 } 24 -
src/gui/mainwindow.cpp
r07ae23a r0bb39f5 1 1 #include "mainwindow.h" 2 #include <appsettings.h>3 2 4 3 #include <QTreeView> … … 28 27 setupUi(this); 29 28 30 // Sanity check for existence of any Conference in the DB 31 // it AppSettings::confId() is 0, but there are any Conference(s) in the DB 32 // set the confId in the AppSettings for the ID of the first conference in the DB 29 int confId = Conference::activeConference(); 30 33 31 QList<Conference> confs = Conference::getAll(); 34 if( !confs.count()) // no conference(s) in the DB32 if(confs.count()) 35 33 { 36 AppSettings::setConfId(0); // no conference in the DB37 }38 else39 {40 if(AppSettings::confId() == 0)41 AppSettings::setConfId(confs[0].id());42 43 34 setWindowTitle(confs[0].title()); 44 35 } … … 62 53 if(Conference::getAll().count()) // no conference(s) in the DB 63 54 { 64 QDate startDate = Conference::getById( AppSettings::confId()).start();65 QDate endDate = Conference::getById( AppSettings::confId()).end();55 QDate startDate = Conference::getById(confId).start(); 56 QDate endDate = Conference::getById(confId).end(); 66 57 // 67 58 dayTabContainer->setDates(startDate, endDate); … … 71 62 searchTabContainer->setDates(startDate, endDate); 72 63 // 73 conferenceTitle->setText(Conference::getById( AppSettings::confId()).title());74 conferenceSubtitle->setText(Conference::getById( AppSettings::confId()).subtitle());75 conferenceWhere->setText(Conference::getById( AppSettings::confId()).city() + ", " + Conference::getById(AppSettings::confId()).venue());64 conferenceTitle->setText(Conference::getById(confId).title()); 65 conferenceSubtitle->setText(Conference::getById(confId).subtitle()); 66 conferenceWhere->setText(Conference::getById(confId).city() + ", " + Conference::getById(confId).venue()); 76 67 conferenceWhen->setText( 77 Conference::getById( AppSettings::confId()).start().toString("dd-MM-yyyy")68 Conference::getById(confId).start().toString("dd-MM-yyyy") 78 69 + ", " + 79 Conference::getById( AppSettings::confId()).end().toString("dd-MM-yyyy"));70 Conference::getById(confId).end().toString("dd-MM-yyyy")); 80 71 } 81 72 … … 99 90 100 91 QList<Conference> confs = Conference::getAll(); 101 if( !confs.count()) // no conference(s) in the DB92 if(confs.count()) 102 93 { 103 AppSettings::setConfId(0); // no conference in the DB104 }105 else106 {107 if(AppSettings::confId() == 0)108 AppSettings::setConfId(confs[0].id());109 110 94 // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates 111 QDate startDate = Conference::getById( AppSettings::confId()).start();112 QDate endDate = Conference::getById( AppSettings::confId()).end();95 QDate startDate = Conference::getById(Conference::activeConference()).start(); 96 QDate endDate = Conference::getById(Conference::activeConference()).end(); 113 97 dayTabContainer->setDates(startDate, endDate); 114 98 tracksTabContainer->setDates(startDate, endDate); -
src/gui/searchtabcontainer.cpp
r07ae23a r0bb39f5 1 2 #include <appsettings.h>3 1 4 2 #include "searchtabcontainer.h" … … 65 63 QString keyword = searchHeader->searchEdit->text().replace( QString("%"), QString("\\%") ); 66 64 qDebug() << "\nKeyword to search: " << keyword; 67 SqlEngine::searchEvent( AppSettings::confId(), columns, keyword );68 65 69 QDate startDate = Conference::getById(AppSettings::confId()).start(); 70 QDate endDate = Conference::getById(AppSettings::confId()).end(); 66 int confId = Conference::activeConference(); 67 SqlEngine::searchEvent( confId, columns, keyword ); 68 69 QDate startDate = Conference::getById(confId).start(); 70 QDate endDate = Conference::getById(confId).end(); 71 71 dayNavigator->setDates(startDate, endDate); 72 updateTreeView( Conference::getById( AppSettings::confId()).start() );72 updateTreeView( Conference::getById(confId).start() ); 73 73 } 74 74 -
src/gui/tabcontainer.cpp
r07ae23a r0bb39f5 36 36 else 37 37 { 38 QDate aStartDate = Conference::getById( AppSettings::confId()).start();39 QDate aEndDate = Conference::getById( AppSettings::confId()).end();38 QDate aStartDate = Conference::getById(Conference::activeConference()).start(); 39 QDate aEndDate = Conference::getById(Conference::activeConference()).end(); 40 40 dayNavigator->setDates(aStartDate, aEndDate); 41 41 } … … 45 45 { 46 46 dayNavigator->show(); 47 loadEvents( aDate, AppSettings::confId() );47 loadEvents( aDate, Conference::activeConference() ); 48 48 treeView->reset(); 49 49 } … … 102 102 } 103 103 104 105 -
src/gui/tabcontainer.h
r07ae23a r0bb39f5 5 5 #include "ui_tabcontainer.h" 6 6 7 #include < appsettings.h>7 #include <conference.h> 8 8 #include <sqlengine.h> 9 9 #include <conference.h>
Note: See TracChangeset
for help on using the changeset viewer.