summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
authorleseb <leseb>2002-07-09 14:45:24 (UTC)
committer leseb <leseb>2002-07-09 14:45:24 (UTC)
commitf7faf1381c556f1b20e2fd91390d31db5a8ea17b (patch) (unidiff)
treee227f7c9cb7118e3f1be915a74c59a45f19c3bd0 /core/pim/datebook/datebook.cpp
parent2d3147a590a150773b84ce6e0aa65f7515a1f178 (diff)
downloadopie-f7faf1381c556f1b20e2fd91390d31db5a8ea17b.zip
opie-f7faf1381c556f1b20e2fd91390d31db5a8ea17b.tar.gz
opie-f7faf1381c556f1b20e2fd91390d31db5a8ea17b.tar.bz2
Change some pics directory (Fix bug #107)
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 76260e2..c0a744a 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -83,117 +83,117 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
83 startTime( 8 ), // an acceptable default 83 startTime( 8 ), // an acceptable default
84 rowStyle( 0 ), 84 rowStyle( 0 ),
85 bJumpToCurTime(FALSE), 85 bJumpToCurTime(FALSE),
86 syncing(FALSE), 86 syncing(FALSE),
87 inSearch(FALSE), 87 inSearch(FALSE),
88 alarmCounter(0) 88 alarmCounter(0)
89{ 89{
90 bool needEvilHack= false; // if we need an Evil Hack 90 bool needEvilHack= false; // if we need an Evil Hack
91 QTime t; 91 QTime t;
92 t.start(); 92 t.start();
93 db = new DateBookDBHack; 93 db = new DateBookDBHack;
94 qDebug("loading db t=%d", t.elapsed() ); 94 qDebug("loading db t=%d", t.elapsed() );
95 loadSettings(); 95 loadSettings();
96 setCaption( tr("Calendar") ); 96 setCaption( tr("Calendar") );
97 setIcon( Resource::loadPixmap( "datebook_icon" ) ); 97 setIcon( Resource::loadPixmap( "datebook_icon" ) );
98 98
99 setToolBarsMovable( FALSE ); 99 setToolBarsMovable( FALSE );
100 100
101 views = new QWidgetStack( this ); 101 views = new QWidgetStack( this );
102 setCentralWidget( views ); 102 setCentralWidget( views );
103 103
104 dayView = 0; 104 dayView = 0;
105 weekView = 0; 105 weekView = 0;
106 weekLstView = 0; 106 weekLstView = 0;
107 monthView = 0; 107 monthView = 0;
108 108
109 QPEToolBar *bar = new QPEToolBar( this ); 109 QPEToolBar *bar = new QPEToolBar( this );
110 bar->setHorizontalStretchable( TRUE ); 110 bar->setHorizontalStretchable( TRUE );
111 111
112 QPEMenuBar *mb = new QPEMenuBar( bar ); 112 QPEMenuBar *mb = new QPEMenuBar( bar );
113 mb->setMargin( 0 ); 113 mb->setMargin( 0 );
114 114
115 QPEToolBar *sub_bar = new QPEToolBar(this); 115 QPEToolBar *sub_bar = new QPEToolBar(this);
116 116
117 QPopupMenu *view = new QPopupMenu( this ); 117 QPopupMenu *view = new QPopupMenu( this );
118 QPopupMenu *settings = new QPopupMenu( this ); 118 QPopupMenu *settings = new QPopupMenu( this );
119 119
120 mb->insertItem( tr( "View" ), view ); 120 mb->insertItem( tr( "View" ), view );
121 mb->insertItem( tr( "Settings" ), settings ); 121 mb->insertItem( tr( "Settings" ), settings );
122 122
123 QActionGroup *g = new QActionGroup( this ); 123 QActionGroup *g = new QActionGroup( this );
124 g->setExclusive( TRUE ); 124 g->setExclusive( TRUE );
125 125
126 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), 126 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ),
127 QString::null, 0, this, 0 ); 127 QString::null, 0, this, 0 );
128 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 128 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
129 a->addTo( sub_bar ); 129 a->addTo( sub_bar );
130 130
131 a = new QAction( tr( "Today" ), Resource::loadPixmap( "to_day" ), QString::null, 0, g, 0 ); 131 a = new QAction( tr( "Today" ), Resource::loadPixmap( "datebook/to_day" ), QString::null, 0, g, 0 );
132 connect( a, SIGNAL( activated() ), this, SLOT( slotToday() ) ); 132 connect( a, SIGNAL( activated() ), this, SLOT( slotToday() ) );
133 a->addTo( sub_bar ); 133 a->addTo( sub_bar );
134 a->addTo( view ); 134 a->addTo( view );
135 135
136 a = new QAction( tr( "Day" ), Resource::loadPixmap( "day" ), QString::null, 0, g, 0 ); 136 a = new QAction( tr( "Day" ), Resource::loadPixmap( "day" ), QString::null, 0, g, 0 );
137 connect( a, SIGNAL( activated() ), this, SLOT( viewDay() ) ); 137 connect( a, SIGNAL( activated() ), this, SLOT( viewDay() ) );
138 a->addTo( sub_bar ); 138 a->addTo( sub_bar );
139 a->addTo( view ); 139 a->addTo( view );
140 a->setToggleAction( TRUE ); 140 a->setToggleAction( TRUE );
141 a->setOn( TRUE ); 141 a->setOn( TRUE );
142 dayAction = a; 142 dayAction = a;
143 143
144 a = new QAction( tr( "Week" ), Resource::loadPixmap( "week" ), QString::null, 0, g, 0 ); 144 a = new QAction( tr( "Week" ), Resource::loadPixmap( "week" ), QString::null, 0, g, 0 );
145 connect( a, SIGNAL( activated() ), this, SLOT( viewWeek() ) ); 145 connect( a, SIGNAL( activated() ), this, SLOT( viewWeek() ) );
146 a->addTo( sub_bar ); 146 a->addTo( sub_bar );
147 a->addTo( view ); 147 a->addTo( view );
148 a->setToggleAction( TRUE ); 148 a->setToggleAction( TRUE );
149 weekAction = a; 149 weekAction = a;
150 150
151 a = new QAction( tr( "WeekLst" ), Resource::loadPixmap( "weeklst" ), QString::null, 0, g, 0 ); 151 a = new QAction( tr( "WeekLst" ), Resource::loadPixmap( "datebook/weeklst" ), QString::null, 0, g, 0 );
152 connect( a, SIGNAL( activated() ), this, SLOT( viewWeekLst() ) ); 152 connect( a, SIGNAL( activated() ), this, SLOT( viewWeekLst() ) );
153 a->addTo( sub_bar ); 153 a->addTo( sub_bar );
154 a->addTo( view ); 154 a->addTo( view );
155 a->setToggleAction( TRUE ); 155 a->setToggleAction( TRUE );
156 weekLstAction = a; 156 weekLstAction = a;
157 157
158 a = new QAction( tr( "Month" ), Resource::loadPixmap( "month" ), QString::null, 0, g, 0 ); 158 a = new QAction( tr( "Month" ), Resource::loadPixmap( "month" ), QString::null, 0, g, 0 );
159 connect( a, SIGNAL( activated() ), this, SLOT( viewMonth() ) ); 159 connect( a, SIGNAL( activated() ), this, SLOT( viewMonth() ) );
160 a->addTo( sub_bar ); 160 a->addTo( sub_bar );
161 a->addTo( view ); 161 a->addTo( view );
162 a->setToggleAction( TRUE ); 162 a->setToggleAction( TRUE );
163 monthAction = a; 163 monthAction = a;
164 164
165 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), QString::null, 0, g, 0 ); 165 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), QString::null, 0, g, 0 );
166 connect( a, SIGNAL(activated()), this, SLOT(slotFind()) ); 166 connect( a, SIGNAL(activated()), this, SLOT(slotFind()) );
167 a->addTo( sub_bar ); 167 a->addTo( sub_bar );
168 168
169 a = new QAction( tr( "Alarm and Start Time..." ), QString::null, 0, 0 ); 169 a = new QAction( tr( "Alarm and Start Time..." ), QString::null, 0, 0 );
170 connect( a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); 170 connect( a, SIGNAL( activated() ), this, SLOT( slotSettings() ) );
171 a->addTo( settings ); 171 a->addTo( settings );
172 172
173 QPopupMenu *default_view = new QPopupMenu(this); 173 QPopupMenu *default_view = new QPopupMenu(this);
174 settings->insertItem( tr( "Default View" ),default_view ); 174 settings->insertItem( tr( "Default View" ),default_view );
175 default_view->setCheckable(TRUE); 175 default_view->setCheckable(TRUE);
176 176
177 Config config("DateBook"); 177 Config config("DateBook");
178 config.setGroup("Main"); 178 config.setGroup("Main");
179 int current=config.readNumEntry("defaultview", DAY); 179 int current=config.readNumEntry("defaultview", DAY);
180 180
181 QActionGroup *ag = new QActionGroup(this); 181 QActionGroup *ag = new QActionGroup(this);
182 a = new QAction( tr( "Day" ), QString::null, 0, 0, 0, true ); 182 a = new QAction( tr( "Day" ), QString::null, 0, 0, 0, true );
183 if (current==DAY) a->setOn(true), viewDay(); 183 if (current==DAY) a->setOn(true), viewDay();
184 ag->insert(a); 184 ag->insert(a);
185 a = new QAction( tr( "Week" ), QString::null, 0, 0, 0, true ); 185 a = new QAction( tr( "Week" ), QString::null, 0, 0, 0, true );
186 if (current==WEEK) a->setOn(true), /*viewWeek(),*/ needEvilHack = true; 186 if (current==WEEK) a->setOn(true), /*viewWeek(),*/ needEvilHack = true;
187 ag->insert(a); 187 ag->insert(a);
188 a = new QAction( tr( "WeekLst" ), QString::null, 0, 0, 0, true ); 188 a = new QAction( tr( "WeekLst" ), QString::null, 0, 0, 0, true );
189 if (current==WEEKLST) a->setOn(true), viewWeekLst(); 189 if (current==WEEKLST) a->setOn(true), viewWeekLst();
190 ag->insert(a); 190 ag->insert(a);
191 a = new QAction( tr( "Month" ), QString::null, 0, 0, 0, true ); 191 a = new QAction( tr( "Month" ), QString::null, 0, 0, 0, true );
192 if (current==MONTH) a->setOn(true), viewMonth(); 192 if (current==MONTH) a->setOn(true), viewMonth();
193 ag->insert(a); 193 ag->insert(a);
194 194
195 ag->addTo(default_view); 195 ag->addTo(default_view);
196 connect(ag, SIGNAL( selected ( QAction * ) ), 196 connect(ag, SIGNAL( selected ( QAction * ) ),
197 this, SLOT( newDefaultView(QAction *) ) 197 this, SLOT( newDefaultView(QAction *) )
198 ); 198 );
199 199