Diffstat (limited to 'noncore/settings/aqpkg/networkpkgmgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp index ed5bf75..3aee7bd 100644 --- a/noncore/settings/aqpkg/networkpkgmgr.cpp +++ b/noncore/settings/aqpkg/networkpkgmgr.cpp | |||
@@ -44,24 +44,25 @@ using namespace std; | |||
44 | #include "global.h" | 44 | #include "global.h" |
45 | 45 | ||
46 | NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget *parent, const char *name) | 46 | NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget *parent, const char *name) |
47 | : QWidget(parent, name) | 47 | : QWidget(parent, name) |
48 | { | 48 | { |
49 | dataMgr = dataManager; | 49 | dataMgr = dataManager; |
50 | 50 | ||
51 | #ifdef QWS | 51 | #ifdef QWS |
52 | // read download directory from config file | 52 | // read download directory from config file |
53 | Config cfg( "aqpkg" ); | 53 | Config cfg( "aqpkg" ); |
54 | cfg.setGroup( "settings" ); | 54 | cfg.setGroup( "settings" ); |
55 | currentlySelectedServer = cfg.readEntry( "selectedServer", "local" ); | 55 | currentlySelectedServer = cfg.readEntry( "selectedServer", "local" ); |
56 | showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" ); | ||
56 | #endif | 57 | #endif |
57 | 58 | ||
58 | 59 | ||
59 | initGui(); | 60 | initGui(); |
60 | setupConnections(); | 61 | setupConnections(); |
61 | 62 | ||
62 | progressDlg = 0; | 63 | progressDlg = 0; |
63 | timerId = startTimer( 100 ); | 64 | timerId = startTimer( 100 ); |
64 | } | 65 | } |
65 | 66 | ||
66 | NetworkPackageManager::~NetworkPackageManager() | 67 | NetworkPackageManager::~NetworkPackageManager() |
67 | { | 68 | { |
@@ -115,35 +116,39 @@ void NetworkPackageManager :: initGui() | |||
115 | download = new QPushButton( "Download", this ); | 116 | download = new QPushButton( "Download", this ); |
116 | upgrade = new QPushButton( "Upgrade", this ); | 117 | upgrade = new QPushButton( "Upgrade", this ); |
117 | apply = new QPushButton( "Apply", this ); | 118 | apply = new QPushButton( "Apply", this ); |
118 | 119 | ||
119 | QVBoxLayout *vbox = new QVBoxLayout( this, 0, -1, "VBox" ); | 120 | QVBoxLayout *vbox = new QVBoxLayout( this, 0, -1, "VBox" ); |
120 | QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1, "HBox1" ); | 121 | QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1, "HBox1" ); |
121 | hbox1->addWidget( l ); | 122 | hbox1->addWidget( l ); |
122 | hbox1->addWidget( serversList ); | 123 | hbox1->addWidget( serversList ); |
123 | 124 | ||
124 | QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1, "HBox1" ); | 125 | QHBoxLayout *hbox3 = new QHBoxLayout( vbox, -1, "HBox1" ); |
125 | QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1, "HBox1" ); | 126 | QHBoxLayout *hbox4 = new QHBoxLayout( vbox, -1, "HBox1" ); |
126 | 127 | ||
127 | char text[2]; | 128 | |
128 | text[1] = '\0'; | 129 | if ( showJumpTo ) |
129 | for ( int i = 0 ; i < 26 ; ++i ) | 130 | { |
130 | { | 131 | char text[2]; |
131 | text[0] = 'A' + i; | 132 | text[1] = '\0'; |
132 | LetterPushButton *b = new LetterPushButton( text, this ); | 133 | for ( int i = 0 ; i < 26 ; ++i ) |
133 | connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) ); | 134 | { |
134 | if ( i < 16 ) | 135 | text[0] = 'A' + i; |
135 | hbox3->addWidget( b ); | 136 | LetterPushButton *b = new LetterPushButton( text, this ); |
136 | else | 137 | connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) ); |
137 | hbox4->addWidget( b ); | 138 | if ( i < 16 ) |
139 | hbox3->addWidget( b ); | ||
140 | else | ||
141 | hbox4->addWidget( b ); | ||
142 | } | ||
138 | } | 143 | } |
139 | 144 | ||
140 | vbox->addWidget( packagesList ); | 145 | vbox->addWidget( packagesList ); |
141 | packagesList->addColumn( "Packages" ); | 146 | packagesList->addColumn( "Packages" ); |
142 | 147 | ||
143 | QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1, "HBox2" ); | 148 | QHBoxLayout *hbox2 = new QHBoxLayout( vbox, -1, "HBox2" ); |
144 | hbox2->addWidget( update ); | 149 | hbox2->addWidget( update ); |
145 | hbox2->addWidget( download ); | 150 | hbox2->addWidget( download ); |
146 | hbox2->addWidget( upgrade ); | 151 | hbox2->addWidget( upgrade ); |
147 | hbox2->addWidget( apply ); | 152 | hbox2->addWidget( apply ); |
148 | } | 153 | } |
149 | 154 | ||