summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/preferencedialogs.cpp
Unidiff
Diffstat (limited to 'noncore/apps/qashmoney/preferencedialogs.cpp') (more/less context) (show whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/preferencedialogs.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/noncore/apps/qashmoney/preferencedialogs.cpp b/noncore/apps/qashmoney/preferencedialogs.cpp
index 3c2fb97..00d52c6 100755
--- a/noncore/apps/qashmoney/preferencedialogs.cpp
+++ b/noncore/apps/qashmoney/preferencedialogs.cpp
@@ -76,12 +76,24 @@ TransactionPreferences::TransactionPreferences ( QWidget* parent ) : QDialog ( p
76 showclearedtransactions = new QCheckBox ( this ); 76 showclearedtransactions = new QCheckBox ( this );
77 showclearedtransactions->setText ( "Show Cleared Transactions" ); 77 showclearedtransactions->setText ( "Show Cleared Transactions" );
78 78
79 excludetransfers = new QCheckBox ( this ); 79 excludetransfers = new QCheckBox ( this );
80 excludetransfers->setText ( "Include Transfers In Limit View" ); 80 excludetransfers->setText ( "Include Transfers In Limit View" );
81 81
82 limittransactionsbox = new QHBox ( this );
83 limittransactionsbox->setSpacing ( 2 );
84 limittransactionslabel = new QLabel ( "Limit All Transactions To", limittransactionsbox );
85 limittransactions = new QComboBox ( limittransactionsbox );
86 limittransactions->insertItem ( "14 days" );
87 limittransactions->insertItem ( "30 days" );
88 limittransactions->insertItem ( "60 days" );
89 limittransactions->insertItem ( "90 days" );
90 limittransactions->insertItem ( "180 days" );
91 limittransactions->insertItem ( "365 days" );
92 limittransactions->insertItem ( "All" );
93
82 if ( preferences->getPreference ( 3 ) == 1 ) 94 if ( preferences->getPreference ( 3 ) == 1 )
83 showclearedtransactions->setChecked ( TRUE ); 95 showclearedtransactions->setChecked ( TRUE );
84 else 96 else
85 showclearedtransactions->setChecked ( FALSE ); 97 showclearedtransactions->setChecked ( FALSE );
86 98
87 if ( preferences->getPreference ( 6 ) == 1 ) 99 if ( preferences->getPreference ( 6 ) == 1 )
@@ -92,23 +104,30 @@ TransactionPreferences::TransactionPreferences ( QWidget* parent ) : QDialog ( p
92 defaults = new QPushButton ( QPixmap ( "/opt/QtPalmtop/pics/defaults.png" ), "Defaults", this ); 104 defaults = new QPushButton ( QPixmap ( "/opt/QtPalmtop/pics/defaults.png" ), "Defaults", this );
93 connect ( defaults, SIGNAL ( released () ), this, SLOT ( setDefaultTransactionPreferences () ) ); 105 connect ( defaults, SIGNAL ( released () ), this, SLOT ( setDefaultTransactionPreferences () ) );
94 106
95 layout = new QVBoxLayout ( this, 2, 2 ); 107 layout = new QVBoxLayout ( this, 2, 2 );
96 layout->addWidget ( showclearedtransactions ); 108 layout->addWidget ( showclearedtransactions );
97 layout->addWidget ( excludetransfers ); 109 layout->addWidget ( excludetransfers );
98 layout->insertSpacing ( 2, 5 ); 110 layout->addWidget ( limittransactionsbox );
111 layout->insertSpacing ( 3, 5 );
99 layout->addWidget ( defaults ); 112 layout->addWidget ( defaults );
100 113
101 connect ( showclearedtransactions, SIGNAL ( toggled ( bool ) ), this, SLOT ( changeShowClearedPreference ( bool ) ) ); 114 connect ( showclearedtransactions, SIGNAL ( toggled ( bool ) ), this, SLOT ( changeShowClearedPreference ( bool ) ) );
102 connect ( excludetransfers, SIGNAL ( toggled ( bool ) ), this, SLOT ( changeExcludeTranfersPreference ( bool ) ) ); 115 connect ( excludetransfers, SIGNAL ( toggled ( bool ) ), this, SLOT ( changeExcludeTranfersPreference ( bool ) ) );
116 connect ( limittransactions, SIGNAL ( activated ( int ) ), this, SLOT ( changeLimitTransactionsPreference ( int ) ) );
103} 117}
104 118
105TransactionPreferences::~TransactionPreferences () 119TransactionPreferences::~TransactionPreferences ()
106 { 120 {
107 } 121 }
108 122
123void TransactionPreferences::changeLimitTransactionsPreference ( int pref )
124 {
125 preferences->changePreference ( 7, pref );
126 }
127
109void TransactionPreferences::changeShowClearedPreference ( bool state ) 128void TransactionPreferences::changeShowClearedPreference ( bool state )
110 { 129 {
111 if ( state == TRUE ) 130 if ( state == TRUE )
112 preferences->changePreference ( 3, 1 ); 131 preferences->changePreference ( 3, 1 );
113 else 132 else
114 preferences->changePreference ( 3, 0 ); 133 preferences->changePreference ( 3, 0 );
@@ -123,13 +142,15 @@ void TransactionPreferences::changeExcludeTranfersPreference ( bool state )
123 } 142 }
124 143
125void TransactionPreferences::setDefaultTransactionPreferences () 144void TransactionPreferences::setDefaultTransactionPreferences ()
126 { 145 {
127 preferences->changePreference ( 3, 0 ); 146 preferences->changePreference ( 3, 0 );
128 preferences->changePreference ( 6, 0 ); 147 preferences->changePreference ( 6, 0 );
148 preferences->changePreference ( 7, 0 );
129 showclearedtransactions->setChecked ( FALSE ); 149 showclearedtransactions->setChecked ( FALSE );
150 limittransactions->setCurrentItem ( 0 );
130 } 151 }
131 152
132// START ACCOUNT PREFERNCES 153// START ACCOUNT PREFERNCES
133 154
134AccountPreferences::AccountPreferences ( QWidget* parent ) : QDialog ( parent, 0, TRUE ) 155AccountPreferences::AccountPreferences ( QWidget* parent ) : QDialog ( parent, 0, TRUE )
135{ 156{