~ubuntu-branches/ubuntu/vivid/kdepim/vivid

« back to all changes in this revision

Viewing changes to calendarviews/eventviews/month/monthview.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Jonathan Riddell, Rohan Garg, Scott Kitterman
  • Date: 2012-11-21 13:12:36 UTC
  • mfrom: (0.2.33)
  • Revision ID: package-import@ubuntu.com-20121121131236-32ijw9a2txrar80k
Tags: 4:4.9.80-0ubuntu1
[ Jonathan Riddell ]
* New upstream beta release

[ Rohan Garg ]
* Add nepomuk-core-dev to build-deps

[ Scott Kitterman ]
* Add new package, libpimcommon4
  - Add libpimcommon4.install
  - Add to debian/control, including kdepim-dbg and kdepim-dev depends
  - Add to kdepim-dev.install
* Remove usr/bin/backupmail and related files from kmail.install as they are
  not provided by upstream anymore
* Add usr/bin/pimsettingexporter and related files to kmail.install
* Add libnepomukwidgets-dev to build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
    MonthScene                      *scene;
65
65
    QDate                            selectedItemDate;
66
66
    Akonadi::Item::Id                selectedItemId;
67
 
    MonthGraphicsView *view;
 
67
    MonthGraphicsView               *view;
 
68
    QToolButton                     *fullView;
68
69
 
69
70
    // List of uids for QDate
70
71
    QMap<QDate, QStringList > mBusyDays;
190
191
    // push buttons to the bottom
191
192
    rightLayout->addStretch( 1 );
192
193
 
 
194
    d->fullView = new QToolButton( this );
 
195
    d->fullView->setIcon( KIcon( "arrow-left-double" ) );
 
196
    d->fullView->setAutoRaise( true );
 
197
    d->fullView->setCheckable( true );
 
198
    d->fullView->setChecked( preferences()->fullViewMonth() );
 
199
    d->fullView->isChecked() ?
 
200
      d->fullView->setToolTip( i18nc( "@info:tooltip",
 
201
                                      "Display calendar in a normal size" ) ) :
 
202
      d->fullView->setToolTip( i18nc( "@info:tooltip",
 
203
                                      "Display calendar in a full window" ) );
 
204
    d->fullView->setWhatsThis(
 
205
      i18nc( "@info:whatsthis",
 
206
             "Click this button and the month view will be enlarged to fill the "
 
207
             "maximum available window space / or shrunk back to its normal size." ) );
 
208
    connect( d->fullView, SIGNAL(clicked()),
 
209
             this, SLOT(changeFullView()) );
 
210
 
193
211
    QToolButton *minusMonth = new QToolButton( this );
194
212
    minusMonth->setIcon( KIcon( "arrow-up-double" ) );
195
 
    minusMonth->setToolTip( i18n( "Go back one month" ) );
196
213
    minusMonth->setAutoRaise( true );
 
214
    minusMonth->setToolTip( i18nc( "@info:tooltip", "Go back one month" ) );
 
215
    minusMonth->setWhatsThis(
 
216
      i18nc( "@info:whatsthis",
 
217
             "Click this button and the view will be scrolled back in time by 1 month." ) );
197
218
    connect( minusMonth, SIGNAL(clicked()),
198
219
            this, SLOT(moveBackMonth()) );
199
220
 
200
221
    QToolButton *minusWeek = new QToolButton( this );
201
222
    minusWeek->setIcon( KIcon( "arrow-up" ) );
202
 
    minusWeek->setToolTip( i18n( "Go back one week" ) );
203
223
    minusWeek->setAutoRaise( true );
 
224
    minusWeek->setToolTip( i18nc( "@info:tooltip", "Go back one week" ) );
 
225
    minusWeek->setWhatsThis(
 
226
      i18nc( "@info:whatsthis",
 
227
             "Click this button and the view will be scrolled back in time by 1 week." ) );
204
228
    connect( minusWeek, SIGNAL(clicked()),
205
229
            this, SLOT(moveBackWeek()) );
206
230
 
207
231
    QToolButton *plusWeek = new QToolButton( this );
208
232
    plusWeek->setIcon( KIcon( "arrow-down" ) );
209
 
    plusWeek->setToolTip( i18n( "Go forward one week" ) );
210
233
    plusWeek->setAutoRaise( true );
 
234
    plusWeek->setToolTip( i18nc( "@info:tooltip", "Go forward one week" ) );
 
235
    plusWeek->setWhatsThis(
 
236
      i18nc( "@info:whatsthis",
 
237
             "Click this button and the view will be scrolled forward in time by 1 week." ) );
211
238
    connect( plusWeek, SIGNAL(clicked()),
212
239
            this, SLOT(moveFwdWeek()) );
213
240
 
214
241
    QToolButton *plusMonth = new QToolButton( this );
215
242
    plusMonth->setIcon( KIcon( "arrow-down-double" ) );
216
 
    plusMonth->setToolTip( i18n( "Go forward one month" ) );
217
243
    plusMonth->setAutoRaise( true );
 
244
    plusMonth->setToolTip( i18nc( "@info:tooltip", "Go forward one month" ) );
 
245
    plusMonth->setWhatsThis(
 
246
      i18nc( "@info:whatsthis",
 
247
             "Click this button and the view will be scrolled forward in time by 1 month." ) );
218
248
    connect( plusMonth, SIGNAL(clicked()),
219
249
            this, SLOT(moveFwdMonth()) );
220
250
 
 
251
    rightLayout->addWidget( d->fullView );
221
252
    rightLayout->addWidget( minusMonth );
222
253
    rightLayout->addWidget( minusWeek );
223
254
    rightLayout->addWidget( plusWeek );
411
442
  }
412
443
}
413
444
 
 
445
void MonthView::changeFullView()
 
446
{
 
447
  bool fullView = d->fullView->isChecked();
 
448
 
 
449
  fullView ?
 
450
    d->fullView->setToolTip( i18nc( "@info:tooltip",
 
451
                                    "Display calendar in a normal size" ) ) :
 
452
    d->fullView->setToolTip( i18nc( "@info:tooltip",
 
453
                                    "Display calendar in a full window" ) );
 
454
 
 
455
  preferences()->setFullViewMonth( fullView );
 
456
  preferences()->writeConfig();
 
457
 
 
458
  emit fullViewChanged( fullView );
 
459
}
 
460
 
414
461
void MonthView::moveBackMonth()
415
462
{
416
463
  d->moveStartDate( 0, -1 );
578
625
        MonthItem *holidayItem =
579
626
          new HolidayMonthItem(
580
627
            d->scene, date,
581
 
            holidays.join( i18nc( "delimiter for joining holiday names", "," ) ) );
 
628
            holidays.join( i18nc( "@item:intext delimiter for joining holiday names", "," ) ) );
582
629
        d->scene->mManagerList << holidayItem;
583
630
      }
584
631
    }
701
748
  calendar()->registerObserver( d );
702
749
}
703
750
 
 
751
 
 
752
#include "monthview.moc"