-rw-r--r-- | korganizer/koprefsdialog.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 452d019..443508d 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -811,192 +811,224 @@ void KOPrefsDialog::setupViewsTab() | |||
811 | KPrefsDialogWidBool *passwdk = | 811 | KPrefsDialogWidBool *passwdk = |
812 | 812 | ||
813 | addWidBool(i18n("Show events, that are done in \nWhat's Next view"), | 813 | addWidBool(i18n("Show events, that are done in \nWhat's Next view"), |
814 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); | 814 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); |
815 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 815 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
816 | passwdk = | 816 | passwdk = |
817 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | 817 | addWidBool(i18n("Show parent To-Do's in What's Next view"), |
818 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 818 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
819 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 819 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
820 | 820 | ||
821 | passwdk = | 821 | passwdk = |
822 | addWidBool(i18n("Show location in What's Next view"), | 822 | addWidBool(i18n("Show location in What's Next view"), |
823 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 823 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
824 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 824 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
825 | 825 | ||
826 | passwdk = | 826 | passwdk = |
827 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), | 827 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), |
828 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 828 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
829 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 829 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
830 | passwdk = | 830 | passwdk = |
831 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), | 831 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), |
832 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 832 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
833 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 833 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
834 | 834 | ||
835 | 835 | ||
836 | 836 | ||
837 | 837 | ||
838 | // *********************** Todo View | 838 | // *********************** Todo View |
839 | 839 | ||
840 | topFrame = addPage(i18n("Todo View"),0,0); | 840 | topFrame = addPage(i18n("Todo View"),0,0); |
841 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 841 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
842 | 842 | ||
843 | topLayout = new QGridLayout(topFrame,4,1); | 843 | topLayout = new QGridLayout(topFrame,4,1); |
844 | topLayout->setSpacing(spacingHint()); | 844 | topLayout->setSpacing(spacingHint()); |
845 | topLayout->setMargin(marginHint()); | 845 | topLayout->setMargin(marginHint()); |
846 | ii = 0; | 846 | ii = 0; |
847 | dummy = | 847 | dummy = |
848 | addWidBool(i18n("Hide not running Todos in To-do view"), | 848 | addWidBool(i18n("Hide not running Todos in To-do view"), |
849 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); | 849 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); |
850 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 850 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
851 | 851 | ||
852 | 852 | ||
853 | KPrefsDialogWidBool *showCompletedTodo = | 853 | KPrefsDialogWidBool *showCompletedTodo = |
854 | addWidBool(i18n("To-do view shows completed Todos"), | 854 | addWidBool(i18n("To-do view shows completed Todos"), |
855 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 855 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
856 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 856 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
857 | dummy = | 857 | dummy = |
858 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 858 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
859 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 859 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
860 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 860 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
861 | 861 | ||
862 | dummy = | 862 | dummy = |
863 | addWidBool(i18n("Small To-do view uses smaller font"), | 863 | addWidBool(i18n("Small To-do view uses smaller font"), |
864 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 864 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
865 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 865 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
866 | 866 | ||
867 | 867 | ||
868 | 868 | ||
869 | dummy = | 869 | dummy = |
870 | addWidBool(i18n("Todo view uses category colors"), | 870 | addWidBool(i18n("Todo view uses category colors"), |
871 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 871 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
872 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 872 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
873 | 873 | ||
874 | 874 | ||
875 | QWidget* wid = new QWidget( topFrame ); | 875 | QWidget* wid = new QWidget( topFrame ); |
876 | // Todo due today color | 876 | // Todo due today color |
877 | KPrefsDialogWidColor *todoDueTodayColor = | 877 | KPrefsDialogWidColor *todoDueTodayColor = |
878 | addWidColor(i18n("Todo due today color:"), | 878 | addWidColor(i18n("Todo due today color:"), |
879 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 879 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
880 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 880 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
881 | widLayout->addWidget( todoDueTodayColor->label() ); | 881 | widLayout->addWidget( todoDueTodayColor->label() ); |
882 | widLayout->addWidget( todoDueTodayColor->button() ); | 882 | widLayout->addWidget( todoDueTodayColor->button() ); |
883 | topLayout->addWidget(wid,ii++,0); | 883 | topLayout->addWidget(wid,ii++,0); |
884 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 884 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
885 | 885 | ||
886 | // Todo overdue color | 886 | // Todo overdue color |
887 | wid = new QWidget( topFrame ); | 887 | wid = new QWidget( topFrame ); |
888 | widLayout = new QHBoxLayout(wid); | 888 | widLayout = new QHBoxLayout(wid); |
889 | KPrefsDialogWidColor *todoOverdueColor = | 889 | KPrefsDialogWidColor *todoOverdueColor = |
890 | addWidColor(i18n("Todo overdue color:"), | 890 | addWidColor(i18n("Todo overdue color:"), |
891 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 891 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
892 | widLayout->addWidget(todoOverdueColor->label()); | 892 | widLayout->addWidget(todoOverdueColor->label()); |
893 | widLayout->addWidget(todoOverdueColor->button()); | 893 | widLayout->addWidget(todoOverdueColor->button()); |
894 | topLayout->addWidget(wid,ii++,0); | 894 | topLayout->addWidget(wid,ii++,0); |
895 | 895 | ||
896 | dummy = | 896 | dummy = |
897 | addWidBool(i18n("Colors are applied to text"), | 897 | addWidBool(i18n("Colors are applied to text"), |
898 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 898 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
899 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 899 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
900 | 900 | ||
901 | dummy = | 901 | dummy = |
902 | addWidBool(i18n("Allday Agenda view shows todos"), | 902 | addWidBool(i18n("Allday Agenda view shows todos"), |
903 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 903 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
904 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 904 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
905 | 905 | ||
906 | 906 | ||
907 | topFrame = addPage(i18n("View Options"),0,0); | ||
908 | |||
909 | topLayout = new QGridLayout(topFrame,4,1); | ||
910 | topLayout->setSpacing(spacingHint()); | ||
911 | topLayout->setMargin(marginHint()); | ||
912 | ii = 0; | ||
913 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); | ||
914 | topLayout->addWidget(lab ,ii++,0); | ||
915 | |||
916 | dummy = addWidBool(i18n("Details"), | ||
917 | &(KOPrefs::instance()->mEVshowDetails),topFrame); | ||
918 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
919 | dummy = addWidBool(i18n("Created time"), | ||
920 | &(KOPrefs::instance()->mEVshowCreated),topFrame); | ||
921 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
922 | dummy = addWidBool(i18n("Last modified time"), | ||
923 | &(KOPrefs::instance()->mEVshowChanged),topFrame); | ||
924 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
925 | |||
926 | |||
927 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); | ||
928 | topLayout->addWidget(lab ,ii++,0); | ||
929 | |||
930 | dummy = addWidBool(i18n("Details"), | ||
931 | &(KOPrefs::instance()->mWTshowDetails),topFrame); | ||
932 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
933 | dummy = addWidBool(i18n("Created time"), | ||
934 | &(KOPrefs::instance()->mWTshowCreated),topFrame); | ||
935 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
936 | dummy = addWidBool(i18n("Last modified time"), | ||
937 | &(KOPrefs::instance()->mWTshowChanged),topFrame); | ||
938 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
907 | 939 | ||
908 | 940 | ||
909 | topFrame = addPage(i18n("Alarm"),0,0); | 941 | topFrame = addPage(i18n("Alarm"),0,0); |
910 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 942 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
911 | 943 | ||
912 | topLayout = new QGridLayout(topFrame,2,1); | 944 | topLayout = new QGridLayout(topFrame,2,1); |
913 | topLayout->setSpacing(spacingHint()); | 945 | topLayout->setSpacing(spacingHint()); |
914 | topLayout->setMargin(marginHint()); | 946 | topLayout->setMargin(marginHint()); |
915 | int iii = 0; | 947 | int iii = 0; |
916 | 948 | ||
917 | dummy = | 949 | dummy = |
918 | addWidBool(i18n("Use internal alarm notification"), | 950 | addWidBool(i18n("Use internal alarm notification"), |
919 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 951 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
920 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 952 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
921 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); | 953 | lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); |
922 | 954 | ||
923 | topLayout->addWidget(lab ,iii++,0); | 955 | topLayout->addWidget(lab ,iii++,0); |
924 | #ifndef DESKTOP_VERSION | 956 | #ifndef DESKTOP_VERSION |
925 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 957 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
926 | #else | 958 | #else |
927 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 959 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
928 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 960 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
929 | #endif | 961 | #endif |
930 | 962 | ||
931 | QHBox* dummyBox = new QHBox(topFrame); | 963 | QHBox* dummyBox = new QHBox(topFrame); |
932 | new QLabel(i18n("Play beeps count:"),dummyBox); | 964 | new QLabel(i18n("Play beeps count:"),dummyBox); |
933 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 965 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
934 | topLayout->addWidget(dummyBox,iii++,0); | 966 | topLayout->addWidget(dummyBox,iii++,0); |
935 | 967 | ||
936 | dummyBox = new QHBox(topFrame); | 968 | dummyBox = new QHBox(topFrame); |
937 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 969 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
938 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 970 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
939 | topLayout->addWidget(dummyBox,iii++,0); | 971 | topLayout->addWidget(dummyBox,iii++,0); |
940 | 972 | ||
941 | dummyBox = new QHBox(topFrame); | 973 | dummyBox = new QHBox(topFrame); |
942 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 974 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
943 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 975 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
944 | topLayout->addWidget(dummyBox,iii++,0); | 976 | topLayout->addWidget(dummyBox,iii++,0); |
945 | 977 | ||
946 | dummyBox = new QHBox(topFrame); | 978 | dummyBox = new QHBox(topFrame); |
947 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 979 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
948 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 980 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
949 | topLayout->addWidget(dummyBox,iii++,0); | 981 | topLayout->addWidget(dummyBox,iii++,0); |
950 | 982 | ||
951 | 983 | ||
952 | 984 | ||
953 | 985 | ||
954 | 986 | ||
955 | 987 | ||
956 | 988 | ||
957 | QHBox* hbo = new QHBox ( topFrame ); | 989 | QHBox* hbo = new QHBox ( topFrame ); |
958 | mDefaultAlarmFile = new QLineEdit(hbo); | 990 | mDefaultAlarmFile = new QLineEdit(hbo); |
959 | QPushButton * loadTemplate = new QPushButton(hbo); | 991 | QPushButton * loadTemplate = new QPushButton(hbo); |
960 | QPixmap icon; | 992 | QPixmap icon; |
961 | if ( QApplication::desktop()->width() < 321 ) | 993 | if ( QApplication::desktop()->width() < 321 ) |
962 | icon = SmallIcon("fileimport16"); | 994 | icon = SmallIcon("fileimport16"); |
963 | else | 995 | else |
964 | icon = SmallIcon("fileimport"); | 996 | icon = SmallIcon("fileimport"); |
965 | loadTemplate->setIconSet (icon ) ; | 997 | loadTemplate->setIconSet (icon ) ; |
966 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); | 998 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); |
967 | int size = loadTemplate->sizeHint().height(); | 999 | int size = loadTemplate->sizeHint().height(); |
968 | loadTemplate->setFixedSize( size, size ); | 1000 | loadTemplate->setFixedSize( size, size ); |
969 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); | 1001 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); |
970 | // topLayout->addWidget(lab ,iii++,0); | 1002 | // topLayout->addWidget(lab ,iii++,0); |
971 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); | 1003 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); |
972 | topLayout->addWidget(lab ,iii++,0); | 1004 | topLayout->addWidget(lab ,iii++,0); |
973 | topLayout->addWidget(hbo,iii++,0); | 1005 | topLayout->addWidget(hbo,iii++,0); |
974 | // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); | 1006 | // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); |
975 | 1007 | ||
976 | // topLayout->addWidget(lab ,iii++,0); | 1008 | // topLayout->addWidget(lab ,iii++,0); |
977 | // #ifndef DESKTOP_VERSION | 1009 | // #ifndef DESKTOP_VERSION |
978 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 1010 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
979 | // #else | 1011 | // #else |
980 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 1012 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
981 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 1013 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
982 | // #endif | 1014 | // #endif |
983 | 1015 | ||
984 | 1016 | ||
985 | } | 1017 | } |
986 | 1018 | ||
987 | void KOPrefsDialog::selectSoundFile() | 1019 | void KOPrefsDialog::selectSoundFile() |
988 | { | 1020 | { |
989 | QString fileName = mDefaultAlarmFile->text(); | 1021 | QString fileName = mDefaultAlarmFile->text(); |
990 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); | 1022 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); |
991 | if ( fileName.length() > 0 ) | 1023 | if ( fileName.length() > 0 ) |
992 | mDefaultAlarmFile->setText( fileName ); | 1024 | mDefaultAlarmFile->setText( fileName ); |
993 | } | 1025 | } |
994 | void KOPrefsDialog::setupFontsTab() | 1026 | void KOPrefsDialog::setupFontsTab() |
995 | { | 1027 | { |
996 | 1028 | ||
997 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 1029 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
998 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 1030 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
999 | 1031 | ||
1000 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 1032 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
1001 | topLayout->setSpacing(1); | 1033 | topLayout->setSpacing(1); |
1002 | topLayout->setMargin(3); | 1034 | topLayout->setMargin(3); |