author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/calprinter.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | korganizer/calprinter.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/korganizer/calprinter.cpp b/korganizer/calprinter.cpp index 0cdf28e..d4bf988 100644 --- a/korganizer/calprinter.cpp +++ b/korganizer/calprinter.cpp | |||
@@ -8,41 +8,44 @@ | |||
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qvbuttongroup.h> | 24 | // #include <qvbuttongroup.h> |
25 | #include <qwidgetstack.h> | 25 | #include <q3widgetstack.h> |
26 | #include <qradiobutton.h> | 26 | #include <qradiobutton.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qcombobox.h> | 29 | #include <qcombobox.h> |
30 | #include <qlabel.h> | 30 | #include <qlabel.h> |
31 | #include <qvbox.h> | 31 | #include <q3vbox.h> |
32 | #include <qsplitter.h> | 32 | #include <qsplitter.h> |
33 | //Added by qt3to4: | ||
34 | #include <Q3GridLayout> | ||
35 | #include <Q3PtrList> | ||
33 | 36 | ||
34 | #include <kprinter.h> | 37 | #include <kprinter.h> |
35 | #include <kglobal.h> | 38 | #include <kglobal.h> |
36 | #include <ksimpleconfig.h> | 39 | #include <ksimpleconfig.h> |
37 | #include <kmessagebox.h> | 40 | #include <kmessagebox.h> |
38 | #include <kdebug.h> | 41 | #include <kdebug.h> |
39 | //#include <kdeversion.h> | 42 | //#include <kdeversion.h> |
40 | 43 | ||
41 | #include "koprefsdialog.h" | 44 | #include "koprefsdialog.h" |
42 | 45 | ||
43 | #include "calprinter.h" | 46 | #include "calprinter.h" |
44 | #ifndef KORG_NOPRINTER | 47 | #ifndef KORG_NOPRINTER |
45 | //#include "calprinter.moc" | 48 | //#include "calprinter.moc" |
46 | 49 | ||
47 | #include "calprintplugins.h" | 50 | #include "calprintplugins.h" |
48 | 51 | ||
@@ -161,63 +164,63 @@ void CalPrinter::doPrint( CalPrintBase *selectedStyle, bool preview ) | |||
161 | break; | 164 | break; |
162 | } | 165 | } |
163 | selectedStyle->doPrint(); | 166 | selectedStyle->doPrint(); |
164 | } | 167 | } |
165 | //mPrinter->setPreviewOnly( false ); | 168 | //mPrinter->setPreviewOnly( false ); |
166 | } | 169 | } |
167 | 170 | ||
168 | /////////////////////////////////////////////////////////////////////////////// | 171 | /////////////////////////////////////////////////////////////////////////////// |
169 | 172 | ||
170 | void CalPrinter::updateConfig() | 173 | void CalPrinter::updateConfig() |
171 | { | 174 | { |
172 | } | 175 | } |
173 | 176 | ||
174 | 177 | ||
175 | /****************************************************************************/ | 178 | /****************************************************************************/ |
176 | 179 | ||
177 | CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, | 180 | CalPrintDialog::CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p, |
178 | QWidget *parent, const char *name ) | 181 | QWidget *parent, const char *name ) |
179 | : KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ), | 182 | : KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ), |
180 | mPrinter( p ), mPrintPlugins( plugins ) | 183 | mPrinter( p ), mPrintPlugins( plugins ) |
181 | { | 184 | { |
182 | QVBox *page = new QVBox(this);//makeVBoxMainWidget(); | 185 | Q3VBox *page = new Q3VBox(this);//makeVBoxMainWidget(); |
183 | setMainWidget( page ); | 186 | setMainWidget( page ); |
184 | QHBox *printerLayout = new QHBox( page ); | 187 | Q3HBox *printerLayout = new Q3HBox( page ); |
185 | 188 | ||
186 | mPrinterLabel = new QLabel( printerLayout ); | 189 | mPrinterLabel = new QLabel( printerLayout ); |
187 | QPushButton *setupButton = new QPushButton( i18n("&Setup Printer..."), | 190 | QPushButton *setupButton = new QPushButton( i18n("&Setup Printer..."), |
188 | printerLayout ); | 191 | printerLayout ); |
189 | setupButton->setSizePolicy( QSizePolicy( | 192 | setupButton->setSizePolicy( QSizePolicy( |
190 | (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, | 193 | (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, |
191 | 0, 0, setupButton->sizePolicy().hasHeightForWidth() ) ); | 194 | 0, 0, setupButton->sizePolicy().hasHeightForWidth() ) ); |
192 | 195 | ||
193 | QSplitter *splitter = new QSplitter( page ); | 196 | QSplitter *splitter = new QSplitter( page ); |
194 | splitter->setOrientation( QSplitter::Horizontal ); | 197 | splitter->setOrientation( Qt::Horizontal ); |
195 | 198 | ||
196 | mTypeGroup = new QVButtonGroup( i18n("View Type"), splitter, "buttonGroup" ); | 199 | mTypeGroup = new Q3VButtonGroup( i18n("View Type"), splitter, "buttonGroup" ); |
197 | // use the minimal width possible = max width of the radio buttons, not extensible | 200 | // use the minimal width possible = max width of the radio buttons, not extensible |
198 | /* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, | 201 | /* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, |
199 | (QSizePolicy::SizeType)5, 0, 0, | 202 | (QSizePolicy::SizeType)5, 0, 0, |
200 | mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/ | 203 | mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/ |
201 | 204 | ||
202 | QWidget *splitterRight = new QWidget( splitter, "splitterRight" ); | 205 | QWidget *splitterRight = new QWidget( splitter, "splitterRight" ); |
203 | QGridLayout *splitterRightLayout = new QGridLayout( splitterRight ); | 206 | Q3GridLayout *splitterRightLayout = new Q3GridLayout( splitterRight ); |
204 | splitterRightLayout->setMargin( marginHint() ); | 207 | splitterRightLayout->setMargin( marginHint() ); |
205 | splitterRightLayout->setSpacing( spacingHint() ); | 208 | splitterRightLayout->setSpacing( spacingHint() ); |
206 | 209 | ||
207 | mConfigArea = new QWidgetStack( splitterRight, "configWidgetStack" ); | 210 | mConfigArea = new Q3WidgetStack( splitterRight, "configWidgetStack" ); |
208 | splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 ); | 211 | splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 ); |
209 | 212 | ||
210 | QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"), | 213 | QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"), |
211 | splitterRight, "orientationLabel" ); | 214 | splitterRight, "orientationLabel" ); |
212 | splitterRightLayout->addWidget( orientationLabel, 1, 0 ); | 215 | splitterRightLayout->addWidget( orientationLabel, 1, 0 ); |
213 | 216 | ||
214 | mOrientationSelection = new QComboBox( splitterRight, "orientationCombo" ); | 217 | mOrientationSelection = new QComboBox( splitterRight, "orientationCombo" ); |
215 | mOrientationSelection->insertItem( i18n("Use Default of Selected Style") ); | 218 | mOrientationSelection->insertItem( i18n("Use Default of Selected Style") ); |
216 | mOrientationSelection->insertItem( i18n("Use Default Setting of Printer") ); | 219 | mOrientationSelection->insertItem( i18n("Use Default Setting of Printer") ); |
217 | mOrientationSelection->insertItem( i18n("Portrait") ); | 220 | mOrientationSelection->insertItem( i18n("Portrait") ); |
218 | mOrientationSelection->insertItem( i18n("Landscape") ); | 221 | mOrientationSelection->insertItem( i18n("Landscape") ); |
219 | splitterRightLayout->addWidget( mOrientationSelection, 1, 1 ); | 222 | splitterRightLayout->addWidget( mOrientationSelection, 1, 1 ); |
220 | 223 | ||
221 | // signals and slots connections | 224 | // signals and slots connections |
222 | connect( setupButton, SIGNAL( clicked() ), SLOT( setupPrinter() ) ); | 225 | connect( setupButton, SIGNAL( clicked() ), SLOT( setupPrinter() ) ); |
223 | connect( mTypeGroup, SIGNAL( clicked( int ) ), SLOT( setPrintType( int ) ) ); | 226 | connect( mTypeGroup, SIGNAL( clicked( int ) ), SLOT( setPrintType( int ) ) ); |