author | zautrix <zautrix> | 2005-07-04 14:29:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-04 14:29:18 (UTC) |
commit | 7221ff029af217ae703e8217333bd9b170203181 (patch) (unidiff) | |
tree | f294b7f4c0235858868c2a44f70b3014b7c53aab /korganizer/kojournalview.cpp | |
parent | 172078c08cd183e9f7ec913a9bf42426e3585b78 (diff) | |
download | kdepimpi-7221ff029af217ae703e8217333bd9b170203181.zip kdepimpi-7221ff029af217ae703e8217333bd9b170203181.tar.gz kdepimpi-7221ff029af217ae703e8217333bd9b170203181.tar.bz2 |
box
-rw-r--r-- | korganizer/kojournalview.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 6fa9b23..9b0e748 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp | |||
@@ -29,69 +29,69 @@ | |||
29 | #include <qpopupmenu.h> | 29 | #include <qpopupmenu.h> |
30 | #include <qhbox.h> | 30 | #include <qhbox.h> |
31 | #include <qpushbutton.h> | 31 | #include <qpushbutton.h> |
32 | #include <qlabel.h> | 32 | #include <qlabel.h> |
33 | #include <qpushbutton.h> | 33 | #include <qpushbutton.h> |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | 35 | ||
36 | #include <klocale.h> | 36 | #include <klocale.h> |
37 | #include <kdebug.h> | 37 | #include <kdebug.h> |
38 | #include "koprefs.h" | 38 | #include "koprefs.h" |
39 | #include <kglobal.h> | 39 | #include <kglobal.h> |
40 | 40 | ||
41 | #include <libkcal/calendar.h> | 41 | #include <libkcal/calendar.h> |
42 | 42 | ||
43 | #include "journalentry.h" | 43 | #include "journalentry.h" |
44 | 44 | ||
45 | #include "kojournalview.h" | 45 | #include "kojournalview.h" |
46 | using namespace KOrg; | 46 | using namespace KOrg; |
47 | 47 | ||
48 | KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, | 48 | KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, |
49 | const char *name) | 49 | const char *name) |
50 | : KOrg::BaseView(calendar, parent, name) | 50 | : KOrg::BaseView(calendar, parent, name) |
51 | { | 51 | { |
52 | mCalendar = calendar; | 52 | mCalendar = calendar; |
53 | QScrollView * sv = new QScrollView( this ); | 53 | QHBox * vb = new QHBox ( this ); |
54 | QHBoxLayout * hbl = new QHBoxLayout( this ); | ||
55 | hbl->addWidget( sv ); | ||
56 | parWid = new QWidget( sv->viewport() ); | ||
57 | sv->addChild(parWid); | ||
58 | sv->setResizePolicy( QScrollView:: AutoOneFit ); | ||
59 | mTopLayout = new QVBoxLayout(parWid); | ||
60 | QHBox * vb = new QHBox ( parWid ); | ||
61 | QPushButton * newJournal = new QPushButton( vb ); | 54 | QPushButton * newJournal = new QPushButton( vb ); |
62 | QPixmap icon; | 55 | QPixmap icon; |
63 | if ( QApplication::desktop()->width() < 321 ) | 56 | if ( QApplication::desktop()->width() < 321 ) |
64 | icon = SmallIcon("ko16old"); | 57 | icon = SmallIcon("ko16old"); |
65 | else | 58 | else |
66 | icon = SmallIcon("ko24old"); | 59 | icon = SmallIcon("ko24old"); |
67 | newJournal->setPixmap (icon ) ; | 60 | newJournal->setPixmap (icon ) ; |
68 | int size = newJournal->sizeHint().height(); | 61 | int size = newJournal->sizeHint().height(); |
69 | newJournal->setFixedSize( size, size ); | 62 | newJournal->setFixedSize( size, size ); |
70 | mDateLabel = new QLabel ( vb ); | 63 | mDateLabel = new QLabel ( vb ); |
71 | mTopLayout->addWidget( vb ); | ||
72 | mDateLabel->setMargin(1); | 64 | mDateLabel->setMargin(1); |
73 | mDateLabel->setAlignment(AlignCenter); | 65 | mDateLabel->setAlignment(AlignCenter); |
66 | QScrollView * sv = new QScrollView( this ); | ||
67 | QVBoxLayout * hbl = new QVBoxLayout( this ); | ||
68 | hbl->addWidget( vb ); | ||
69 | hbl->addWidget( sv ); | ||
70 | parWid = new QWidget( sv->viewport() ); | ||
71 | sv->addChild(parWid); | ||
72 | sv->setResizePolicy( QScrollView:: AutoOneFit ); | ||
73 | mTopLayout = new QVBoxLayout(parWid); | ||
74 | connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); | 74 | connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); |
75 | getNewEntry(); | 75 | getNewEntry(); |
76 | } | 76 | } |
77 | 77 | ||
78 | KOJournalView::~KOJournalView() | 78 | KOJournalView::~KOJournalView() |
79 | { | 79 | { |
80 | } | 80 | } |
81 | 81 | ||
82 | int KOJournalView::currentDateCount() | 82 | int KOJournalView::currentDateCount() |
83 | { | 83 | { |
84 | return 0; | 84 | return 0; |
85 | } | 85 | } |
86 | JournalEntry* KOJournalView::getNewEntry() | 86 | JournalEntry* KOJournalView::getNewEntry() |
87 | { | 87 | { |
88 | JournalEntry* Entry = new JournalEntry(mCalendar,parWid); | 88 | JournalEntry* Entry = new JournalEntry(mCalendar,parWid); |
89 | jEntries.append( Entry ); | 89 | jEntries.append( Entry ); |
90 | mTopLayout->addWidget(Entry); | 90 | mTopLayout->addWidget(Entry); |
91 | Entry->setFont ( KOPrefs::instance()->mJornalViewFont ); | 91 | Entry->setFont ( KOPrefs::instance()->mJornalViewFont ); |
92 | connect ( Entry,SIGNAL(deleteJournal(Journal *) ),this ,SIGNAL(deleteJournal(Journal *) ) ) ; | 92 | connect ( Entry,SIGNAL(deleteJournal(Journal *) ),this ,SIGNAL(deleteJournal(Journal *) ) ) ; |
93 | connect ( Entry,SIGNAL(newJournal() ),this ,SLOT(newJournal() ) ) ; | 93 | connect ( Entry,SIGNAL(newJournal() ),this ,SLOT(newJournal() ) ) ; |
94 | connect ( Entry,SIGNAL(showJournalOnly( Journal * ) ),this ,SLOT(showOnly ( Journal* ) ) ) ; | 94 | connect ( Entry,SIGNAL(showJournalOnly( Journal * ) ),this ,SLOT(showOnly ( Journal* ) ) ) ; |
95 | return Entry; | 95 | return Entry; |
96 | } | 96 | } |
97 | 97 | ||