summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-11 09:22:29 (UTC)
committer zautrix <zautrix>2005-06-11 09:22:29 (UTC)
commitd4501288ba7414ba89a791dd2c306e9f74eeb3fa (patch) (side-by-side diff)
treea99b30c87947a22f9c2da3ab5426f4e5ed8de9ab
parentb214921b2072079ec59a87ac84231f83532009d5 (diff)
downloadkdepimpi-d4501288ba7414ba89a791dd2c306e9f74eeb3fa.zip
kdepimpi-d4501288ba7414ba89a791dd2c306e9f74eeb3fa.tar.gz
kdepimpi-d4501288ba7414ba89a791dd2c306e9f74eeb3fa.tar.bz2
fixx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/kofilterview.cpp2
-rw-r--r--korganizer/kofilterview.h50
3 files changed, 54 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index ea100d1..8d992b9 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -462,24 +462,25 @@ void CalendarView::init()
mTodoList->setNavigator( mNavigator );
#if 0
if ( QApplication::desktop()->width() < 480 ) {
leftFrameLayout->addWidget(mFilterView);
leftFrameLayout->addWidget(mTodoList, 2 );
} else {
leftFrameLayout->addWidget(mTodoList,2 );
leftFrameLayout->addWidget(mFilterView );
}
#endif
mFilterView->hide();
+ mCalEditView->hide();
QWidget *rightBox = new QWidget( mMainFrame );
//mainBoxLayout->addWidget ( rightBox, 10 );
QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
mRightFrame = new QWidgetStack( rightBox );
rightLayout->addWidget( mRightFrame, 10 );
//mLeftFrame = (QWidget *)leftFrame;
if ( KOPrefs::instance()->mVerticalScreen ) {
//mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() );
//mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() );
//mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() );
//leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() );
@@ -3900,27 +3901,28 @@ void CalendarView::toggleFilter()
}
KOFilterView *CalendarView::filterView()
{
return mFilterView;
}
void CalendarView::selectFilter( int fil )
{
mFilterView->setSelectedFilter( fil );
}
void CalendarView::showFilter(bool visible)
{
+#if 0
if (visible) mCalEditView->show();
else mCalEditView->hide();
-#if 0
+#else
if (visible) mFilterView->show();
else mFilterView->hide();
#endif
}
void CalendarView::toggleFilerEnabled( )
{
mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() );
if ( !mFilterView->filtersEnabled() )
topLevelWidget()->setCaption( i18n("Filter disabled ") );
}
void CalendarView::updateFilter()
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index 1bfe4dd..dc6237b 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -129,25 +129,25 @@ KOCalEditView::KOCalEditView(QWidget* parent,
addBut->setPixmap ( SmallIcon("bell"));
connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm()));
addBut->setMaximumWidth( addBut->sizeHint().height() );
addBut = new QPushButton ( this );
mainLayout->addWidget( addBut,0,4 );
addBut->setPixmap ( SmallIcon("pencil"));
connect(addBut,SIGNAL(clicked()),SLOT(disableRO()));
addBut->setMaximumWidth( addBut->sizeHint().height() );
addBut = new QPushButton ( this );
mainLayout->addWidget( addBut,0,5 );
- addBut->setPixmap ( SmallIcon("trash"));
+ addBut->setPixmap ( SmallIcon("minus"));
connect(addBut,SIGNAL(clicked()),SLOT(deleteAll()));
addBut->setMaximumWidth( addBut->sizeHint().height() );
}
KOCalEditView::~KOCalEditView()
{
// no need to delete child widgets, Qt does it all for us
}
void KOCalEditView::readConfig( KConfig *)
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index d434c52..060108f 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -15,24 +15,26 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef KOFILTERVIEW_H
#define KOFILTERVIEW_H
#include <qstring.h>
+#include <qcheckbox.h>
+#include <qpushbutton.h>
#include <kconfig.h>
#include "kofilterview_base.h"
#include <libkcal/calfilter.h>
using namespace KCal;
class KOFilterView : public KOFilterView_base
{
Q_OBJECT
public:
KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0);
@@ -69,15 +71,63 @@ class KOCalEditView : public QWidget
void disableRO();
void deleteAll();
signals:
void alarmEnabled ( int cal, bool enable );
void calendarEnabled ( int cal, bool enable );
void calendarReadonly ( int cal, bool readonly );
void setCalendarDefault ( int cal );
void removeCalendar ( int cal );
private:
};
+class KOCalButton : public QPushButton
+{
+ Q_OBJECT
+ public:
+ KOCalButton( QWidget *parent=0, const char *name=0 ) :
+ QPushButton( parent, name)
+ {
+ connect( this, SIGNAL( clicked() ),
+ SLOT( bottonClicked() ));
+ mNumber = -1;
+ }
+ void setNum ( int num ) {mNumber = num; }
+ signals:
+ void selectNum ( int );
+private:
+ int mNumber;
+ void keyPressEvent ( QKeyEvent * e )
+ {
+ e->ignore();
+ }
+
+private slots :
+ void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); }
+};
+class KOCalCheckButton : public QCheckBox
+{
+ Q_OBJECT
+ public:
+ KOCalCheckButton( QWidget *parent=0, const char *name=0 ) :
+ QCheckBox( parent, name)
+ {
+ connect( this, SIGNAL( toggled ( bool ) ),
+ SLOT( bottonClicked( bool ) ));
+ mNumber = -1;
+ }
+ void setNum ( int num ) {mNumber = num; }
+ signals:
+ void selectNum ( int, bool );
+private:
+ int mNumber;
+ void keyPressEvent ( QKeyEvent * e )
+ {
+ e->ignore();
+ }
+
+private slots :
+ void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); }
+};
#endif // KOFILTERVIEW_H