plasma-widget-quickaccess-0.8.1/000755 001750 001750 00000000000 11207354646 014762 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/pluginmodel.h000644 001750 001750 00000004321 11207307040 017434 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef PluginModel_HEADER #define PluginModel_HEADER #include class PluginModelPrivate; class Plugin { public: Plugin() :active(false) {} ~Plugin() {} QString name; QString prettyName; bool active; //QIcon mimeIcon; }; class PluginModel : public QAbstractListModel { Q_OBJECT public: PluginModel(QObject *parent = 0); ~PluginModel(); Plugin* plugin(const QModelIndex &index); Plugin* plugin(int row); int rowCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; Qt::ItemFlags flags(const QModelIndex &index) const; QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; private: PluginModelPrivate * const d; }; #endif //PluginModel_HEADER plasma-widget-quickaccess-0.8.1/COPYING000644 001750 001750 00000043110 11207307040 015776 0ustar00000000 000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 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 Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. plasma-widget-quickaccess-0.8.1/label.cpp000644 001750 001750 00000012452 11207307040 016533 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include "label.h" #include #include #include #include #include #include //#include #include "effects.h" Label::Label(Settings *settings, QWidget *parent) :QWidget(parent) ,m_settings(settings) ,m_openLabel(0) ,m_hoverTimeLine(0) ,m_hoverTime(0.0) ,m_pathLabel(0) ,m_iconLabel(0) { m_openString = i18n("Open") + ": "; m_hoverTimeLine = new QTimeLine( 200, this ); connect( m_hoverTimeLine, SIGNAL(valueChanged(qreal)), this, SLOT(animateHover(qreal)) ); setContentsMargins(5, 5, 5, 5); QHBoxLayout *layout = new QHBoxLayout(); layout->setSpacing(0); layout->setMargin(0); layout->addSpacing(2); m_openLabel = new QLabel(m_openString, this); m_openLabel->setFixedWidth(0); layout->addWidget(m_openLabel); m_iconLabel = new QLabel( this ); m_iconLabel->setAlignment(Qt::AlignCenter); layout->addWidget(m_iconLabel); m_pathLabel = new KSqueezedTextLabel(this); m_pathLabel->setAlignment( Qt::AlignCenter); m_pathLabel->setTextElideMode ( Qt::ElideLeft ); layout->addWidget(m_pathLabel); layout->addSpacing(2); setLayout( layout ); } Label::~Label() { delete m_openLabel; delete m_hoverTimeLine; delete m_pathLabel; delete m_iconLabel; } void Label::setFileItem(const KFileItem &item) { if(item.isNull()) return; if(!m_settings->showCustomLabel()){ if(item.isLocalFile()) { m_pathLabel->setText(item.localPath()); } else { m_pathLabel->setText(item.url().prettyUrl()); } } else { QString label = item.url().prettyUrl(); label.replace(m_settings->url().prettyUrl(), m_settings->customLabel()); m_pathLabel->setText(label); } //TODO use the icon defined in the settings m_iconLabel->setPixmap(KIcon(item.iconName()).pixmap(KIconLoader::SizeSmallMedium, KIconLoader::SizeSmallMedium)); } void Label::animateHover(qreal value) { m_hoverTime = value; QFontMetrics fm(m_openLabel->font()); m_openLabel->setFixedWidth(fm.width(m_openString) * m_hoverTime); update(); } void Label::mouseReleaseEvent(QMouseEvent *event) { if(event->button() == Qt::LeftButton){ emit clicked(); } QWidget::mouseReleaseEvent(event); } void Label::mouseMoveEvent(QMouseEvent *event) { if(m_hoverTime == 0 && m_hoverTimeLine->state() != QTimeLine::Running) { m_hoverTimeLine->setDirection(QTimeLine::Forward); m_hoverTimeLine->start(); } QWidget::mouseMoveEvent(event); } void Label::enterEvent(QEvent *event) { if (m_hoverTime > 0) return; m_hoverTimeLine->setDirection( QTimeLine::Forward ); if (m_hoverTimeLine->state() == QTimeLine::Running) { m_hoverTimeLine->stop(); } m_hoverTimeLine->start(); QWidget::enterEvent(event); } void Label::leaveEvent(QEvent *event) { m_hoverTimeLine->setDirection( QTimeLine::Backward ); if (m_hoverTimeLine->state() == QTimeLine::Running) m_hoverTimeLine->stop(); m_hoverTimeLine->start(); QWidget::leaveEvent(event); } void Label::paintEvent(QPaintEvent *event) { QWidget::paintEvent(event); QPainter p(this); p.setClipRect(event->rect()); p.setRenderHints(QPainter::Antialiasing); QPen pen; pen.setWidth(1); QColor color = palette().color(QPalette::Highlight); pen.setColor(color); const int x = contentsRect().left(); const int y = contentsRect().top(); const int width = contentsRect().width(); const int height = contentsRect().height(); const int radius = 3; p.setPen(pen); p.drawRoundedRect(contentsRect(), radius, radius); Effects::drawOverlay(&p, QRect(contentsRect().left() + 1, contentsRect().top() + 1, contentsRect().width() - 2, contentsRect().height() - 2 )); color.setAlpha(color.alpha() / 2); for(int i = 1; i < x * m_hoverTime ; i++) { color.setAlpha(color.alpha() - 10*i); pen.setColor(color); p.setPen(pen); p.drawRoundedRect(QRect(x - i, y - i, width + 2*i, height + 2*i), radius, radius); } } plasma-widget-quickaccess-0.8.1/README000644 001750 001750 00000002011 11207307040 015616 0ustar00000000 000000 QuickAccess README ------------------------------------------------------------------------ ------------------------------------------------------------------------ About: ====== I loved the Kickerapplett to browse through directories and since there is no replacement for KDE4/Plasma yet I thought I try to do something similar... Well thats the result... My work is based on the work of some other people, and they should be mentioned: Robert Knight: pieces of code from Kickoff Peter Penz : IconManager Bugs/Wishes: ============ email me: wirrkpf@googlemail.com Install: ======== You need at least KDE 4.2, because the Plasma-API changed from 4.1 to 4.2 You will need the following packages and the corresponding devel packages: -kdelibs -libkonq to install: mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. make sudo make install You have to restart plasma to find QuickAccess in the Add Applets dialog: kbuildsycoca4 kquitapp plasma && plasma The Changelog has moved to the ChangeLog file plasma-widget-quickaccess-0.8.1/label.h000644 001750 001750 00000004520 11207307040 016175 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef Label_HEADER #define Label_HEADER //Qt includes #include #include #include //KDE includes #include #include //Plasma includes #include #include "settings.h" //using namespace Plasma; class Label : public QWidget { Q_OBJECT public: Label(Settings *settings, QWidget *parent = 0); ~Label(); void setFileItem(const KFileItem &); signals: void clicked(); protected: void paintEvent(QPaintEvent *event); void enterEvent(QEvent *event); void leaveEvent(QEvent *event); void mouseReleaseEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); private slots: void animateHover( qreal ); private: Settings *m_settings; QLabel *m_openLabel; QTimeLine *m_hoverTimeLine; qreal m_hoverTime; KSqueezedTextLabel *m_pathLabel; QLabel *m_iconLabel; QString m_openString; }; #endif plasma-widget-quickaccess-0.8.1/effects.cpp000644 001750 001750 00000004442 11207307040 017073 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ //#include #include #include #include "effects.h" namespace Effects { QPainterPath overlayPath(const QRect &rect) { QPainterPath path(QPoint(rect.left(), rect.top())); path.lineTo(rect.left(), rect.top() + rect.height() * 1/2); path.cubicTo(rect.center(), rect.center(), QPoint(rect.left() + rect.width(), rect.top() + rect.height() * 1/2)); path.lineTo(rect.left() + rect.width(), rect.top()); path.lineTo(rect.left(), rect.top()); return path; } void drawOverlay(QPainter *painter, const QRect &rect) { painter->save(); QLinearGradient gradient(rect.center().x(), rect.top(), rect.center().x(), rect.bottom()); gradient.setColorAt(0, QColor(255,255,255, 100)); gradient.setColorAt(1, QColor(255,255,255, 0)); QBrush brush(gradient); painter->fillRect(rect, brush); //painter->fillPath(Effects::overlayPath(rect), brush); painter->restore(); } } //namespace Effects plasma-widget-quickaccess-0.8.1/quickaccess.h000644 001750 001750 00000005642 11207307040 017422 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef QuickAccess_HEADER #define QuickAccess_HEADER //Plasma includes #include #include //locale includes #include "popupdialog.h" #include "pluginwidget.h" #include "ui_quickaccessGeneralConfig.h" #include "ui_quickaccessAppearanceConfig.h" #include "ui_quickaccessPreviewConfig.h" class QuickAccess : public Plasma::Applet { Q_OBJECT public: QuickAccess(QObject *parent, const QVariantList &args); ~QuickAccess(); //Plasma::Applet void init(); public slots: void applySettings(Settings::SettingsType); void toolTipAboutToShow(); void toolTipHidden(); protected: void createConfigurationInterface(KConfigDialog *parent); void dragEnterEvent(QGraphicsSceneDragDropEvent *event); void dragLeaveEvent(QGraphicsSceneDragDropEvent *event); void dropEvent(QGraphicsSceneDragDropEvent *event); void popupEvent(bool show); private slots: void slot_iconClicked(); void slotDragEvent(); void configAccepted(); void showCustomLabelToggled(bool checked); void showPreviewToggled(bool checked); void saveSettings(); private: PopupDialog* dialog(); private: Settings *m_settings; Plasma::IconWidget *m_icon; PopupDialog *m_dialog; QSize m_dialogSize; bool m_dragOver; Ui::quickaccessGeneralConfig uiGeneral; Ui::quickaccessAppearanceConfig uiAppearance; Ui::quickaccessPreviewConfig uiPreview; PluginWidget *pluginWidget; QTimer *m_saveTimer; }; K_EXPORT_PLASMA_APPLET(quickaccess, QuickAccess) #endif plasma-widget-quickaccess-0.8.1/quickaccessPreviewConfig.ui000644 001750 001750 00000002757 11207307040 022304 0ustar00000000 000000 quickaccessPreviewConfig 0 0 412 243 Form Show previews Qt::Horizontal Preview plugins: Here you can enable/disable the plugins. true Qt::Vertical plasma-widget-quickaccess-0.8.1/button.cpp000644 001750 001750 00000003177 11207307040 016773 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include "button.h" Button::Button(QWidget *parent) :QToolButton(parent) { setAutoRaise(true); QPalette p = palette(); p.setColor(QPalette::Button, Qt::transparent); setPalette(p); setFocusPolicy(Qt::NoFocus); } Button::~Button() { } #include "button.moc" plasma-widget-quickaccess-0.8.1/itemview.h000644 001750 001750 00000007425 11207307040 016756 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef ItemView_HEADER #define ItemView_HEADER #include static const int BACK_ARROW_WIDTH = 16; static const int BACK_ARROW_SPACING = 5; static const int ANIMATION_TIME = 100; static const int DRAG_ENTER_TIME = 1000; class ItemView : public QAbstractItemView { Q_OBJECT public: enum ViewMode{ ListMode = 0, IconMode = 1 }; ItemView(QWidget *parent = 0); ~ItemView(); void setViewMode(ItemView::ViewMode mode); ItemView::ViewMode viewMode() const; void setShowToolTips(bool show); bool showToolTips(); //QAbstractItemView QRect visualRect(const QModelIndex &index) const; void setIconSize(const QSize &size); QModelIndex indexAt(const QPoint& point) const; void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible); public slots: void open(const QModelIndex &index = QModelIndex()); void updateAnimation(qreal); void timeLineFinished(); void updateScrollAnimation(qreal); signals: void signal_open(const QModelIndex &); protected: //QWidget void paintEvent(QPaintEvent *event); void resizeEvent(QResizeEvent *event); void mouseMoveEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event); void wheelEvent(QWheelEvent *event); void keyPressEvent(QKeyEvent *event); //QAbstractItemView int horizontalOffset() const; int verticalOffset() const; QModelIndex moveCursor(CursorAction cursorAction,Qt::KeyboardModifiers modifiers); void setSelection(const QRect& rect , QItemSelectionModel::SelectionFlags flags); bool isIndexHidden(const QModelIndex& index) const; QRegion visualRegionForSelection(const QItemSelection& selection) const; void dragEnterEvent(QDragEnterEvent *event); void dropEvent(QDropEvent *event); void startDrag(Qt::DropActions supportedActions); void dragMoveEvent(QDragMoveEvent *event); bool viewportEvent(QEvent *event); //QAbstractScrollArea void contextMenuEvent( QContextMenuEvent *event); private: void paintItems(QPainter &painter, QPaintEvent *event, const QModelIndex &index); void relayout(); private slots: void dragEnter(); void scrollBarValueChanged(int value); void wheelScrollLinesChanged(int category); private: class Private; Private * const d; }; #endif //ItemView_HEADER plasma-widget-quickaccess-0.8.1/resizedialog.h000644 001750 001750 00000004370 11207307040 017602 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef ResizeDialog_HEADER #define ResizeDialog_HEADER //plasma #include class ResizeDialogPrivate; class ResizeDialog : public Plasma::Dialog { Q_OBJECT public: explicit ResizeDialog(QWidget * parent = 0, Qt::WindowFlags f = Qt::Window); virtual ~ResizeDialog(); virtual bool eventFilter(QObject *object, QEvent *event); public slots: void updateColors(); protected: //reimplemented from QObject virtual void childEvent(QChildEvent *event); //reimplemented from QWidget virtual void hideEvent ( QHideEvent * event ); virtual void mouseMoveEvent(QMouseEvent *event); virtual void mousePressEvent(QMouseEvent *event); virtual void mouseReleaseEvent(QMouseEvent *event); virtual void timerEvent(QTimerEvent *event); private: ResizeDialogPrivate * const d; }; #endif //ResizeDialog_HEADER plasma-widget-quickaccess-0.8.1/settings.h000644 001750 001750 00000010007 11207307040 016753 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef Settings_HEADER #define Settings_HEADER #include #include #include #include #include "itemview.h" class Settings : public QObject { Q_OBJECT public: enum SettingsType { IconName = 0, IconSize = 1, Preview = 2, ShowHiddenFiles = 3, ShowOnlyDirs = 4, Filter = 5, CustomLabel = 6, Url = 7, ToolTips = 8, ViewMode = 9, Sorting = 10, All = 11, SingleClickNav = 12, DolphinSorting = 13 }; Settings(QObject *parent = 0); ~Settings(); void setIconName(const QString &name); QString iconName() const; void setIconSize(const int &size); int iconSize() const; void setShowPreviews(bool show); bool showPreviews(); void setShowHiddenFiles(bool show); bool showHiddenFiles(); void setShowOnlyDirs(bool show); bool showOnlyDirs(); void setFilter(const QString &filter); QString filter() const; void setCustomLabel(const QString &label); QString customLabel() const; void setShowCustomLabel(bool show); bool showCustomLabel(); void setUrl(const KUrl &url); KUrl url() const; void setPreviewPlugins(const QStringList &list); //list should be sorted QStringList previewPlugins() const; void setShowToolTips(bool show); bool showToolTips(); void setViewMode(ItemView::ViewMode mode); ItemView::ViewMode viewMode(); void setAllowNavigation(bool allow); bool allowNavigation(); void setSingleClickNavigation(bool allow); bool singleClickNavigation(); void setEnableDolphinSorting(bool allow); bool enableDolphinSorting(); void setSortOrder(Qt::SortOrder order); Qt::SortOrder sortOrder(); void setSortColumn(KDirModel::ModelColumns column); KDirModel::ModelColumns sortColumn(); bool needsSaving(); void saveSettings(KConfigGroup *cg); void readSettings(KConfigGroup *cg); signals: void settingsChanged(Settings::SettingsType type); private: QString m_iconName; int m_iconSize; //QSize m_dialogSize; bool m_showPreviews; bool m_showHiddenFiles; bool m_showOnlyDirs; QString m_filter; QString m_customLabel; bool m_showCustomLabel; KUrl m_url; bool m_showToolTips; bool m_needsSaving; QStringList m_previewPlugins; ItemView::ViewMode m_viewMode; bool m_allowNavigation; bool m_singleClickNavigation; bool m_enableDolphinSorting; Qt::SortOrder m_sortOrder; KDirModel::ModelColumns m_sortColumn; }; #endif //Settings_HEADER plasma-widget-quickaccess-0.8.1/iconmanager.cpp000644 001750 001750 00000036227 11207307040 017745 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Peter Penz * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include "iconmanager.h" #include "dirmodel.h" #include #include #include #include // #include #include #include #include #include #include #include #include IconManager::IconManager(QAbstractItemView* parent, KDirSortFilterProxyModel* model) : QObject(parent), m_showPreview(false), m_clearItemQueues(true), m_view(parent), m_previewTimer(0), m_scrollAreaTimer(0), m_previewJobs(), m_model(0), m_proxyModel(model), m_mimeTypeResolver(0), //m_cutItemsCache(), m_previews(), m_pendingItems(), m_dispatchedItems() { Q_ASSERT(m_view->iconSize().isValid()); // each view must provide its current icon size m_model = static_cast(m_proxyModel->sourceModel()); connect(m_model->dirLister(), SIGNAL(newItems(const KFileItemList&)), this, SLOT(generatePreviews(const KFileItemList&))); m_previewTimer = new QTimer(this); m_previewTimer->setSingleShot(true); connect(m_previewTimer, SIGNAL(timeout()), this, SLOT(dispatchPreviewQueue())); // Whenever the scrollbar values have been changed, the pending previews should // be reordered in a way that the previews for the visible items are generated // first. The reordering is done with a small delay, so that during moving the // scrollbars the CPU load is kept low. m_scrollAreaTimer = new QTimer(this); m_scrollAreaTimer->setSingleShot(true); m_scrollAreaTimer->setInterval(200); connect(m_scrollAreaTimer, SIGNAL(timeout()), this, SLOT(resumePreviews())); connect(m_view->horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(pausePreviews())); connect(m_view->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(pausePreviews())); } IconManager::~IconManager() { killPreviewJobs(); m_pendingItems.clear(); m_dispatchedItems.clear(); if (m_mimeTypeResolver != 0) { m_mimeTypeResolver->deleteLater(); m_mimeTypeResolver = 0; } } void IconManager::setShowPreview(bool show) { if (m_showPreview != show) { m_showPreview = show; if (show) { updatePreviews(); } } if (show && (m_mimeTypeResolver != 0)) { // don't resolve the MIME types if the preview is turned on m_mimeTypeResolver->deleteLater(); m_mimeTypeResolver = 0; } else if (!show && (m_mimeTypeResolver == 0)) { // the preview is turned off: resolve the MIME-types so that // the icons gets updated m_mimeTypeResolver = new KMimeTypeResolver(m_view, m_model); } } void IconManager::setPreviewPlugins(const QStringList &list) { m_previewPlugins = list; } void IconManager::updatePreviews() { if (!m_showPreview) { return; } killPreviewJobs(); m_pendingItems.clear(); m_dispatchedItems.clear(); KFileItemList itemList; const int rowCount = m_model->rowCount(); for (int row = 0; row < rowCount; ++row) { const QModelIndex index = m_model->index(row, 0); KFileItem item = m_model->itemForIndex(index); itemList.append(item); } generatePreviews(itemList); } void IconManager::cancelPreviews() { killPreviewJobs(); m_pendingItems.clear(); m_dispatchedItems.clear(); } void IconManager::generatePreviews(const KFileItemList& items) { if (!m_showPreview) { return; } KFileItemList orderedItems = items; orderItems(orderedItems); foreach (const KFileItem& item, orderedItems) { m_pendingItems.append(item); } startPreviewJob(orderedItems); } void IconManager::addToPreviewQueue(const KFileItem& item, const QPixmap& pixmap) { ItemInfo preview; preview.url = item.url(); preview.pixmap = pixmap; m_previews.append(preview); m_dispatchedItems.append(item); } void IconManager::slotPreviewJobFinished(KJob* job) { const int index = m_previewJobs.indexOf(job); m_previewJobs.removeAt(index); if ((m_previewJobs.count() == 0) && m_clearItemQueues) { m_pendingItems.clear(); m_dispatchedItems.clear(); } } void IconManager::dispatchPreviewQueue() { int previewsCount = m_previews.count(); if (previewsCount > 0) { // Applying the previews to the model must be done step by step // in larger blocks: Applying a preview immediately when getting the signal // 'gotPreview()' from the PreviewJob is too expensive, as a relayout // of the view would be triggered for each single preview. int dispatchCount = 30; if (dispatchCount > previewsCount) { dispatchCount = previewsCount; } for (int i = 0; i < dispatchCount; ++i) { const ItemInfo& preview = m_previews.first(); replaceIcon(preview.url, preview.pixmap); m_previews.pop_front(); } previewsCount = m_previews.count(); } const bool workingPreviewJobs = (m_previewJobs.count() > 0); if (workingPreviewJobs) { // poll for previews as long as not all preview jobs are finished m_previewTimer->start(200); } else if (previewsCount > 0) { // all preview jobs are finished but there are still pending previews // in the queue -> poll more aggressively m_previewTimer->start(10); } } void IconManager::pausePreviews() { foreach (KJob* job, m_previewJobs) { Q_ASSERT(job != 0); job->suspend(); } m_scrollAreaTimer->start(); } void IconManager::resumePreviews() { // Before creating new preview jobs the m_pendingItems queue must be // cleaned up by removing the already dispatched items. Implementation // note: The order of the m_dispatchedItems queue and the m_pendingItems // queue is usually equal. So even when having a lot of elements the // nested loop is no performance bottle neck, as the inner loop is only // entered once in most cases. foreach (const KFileItem& item, m_dispatchedItems) { KFileItemList::iterator begin = m_pendingItems.begin(); KFileItemList::iterator end = m_pendingItems.end(); for (KFileItemList::iterator it = begin; it != end; ++it) { if ((*it).url() == item.url()) { m_pendingItems.erase(it); break; } } } m_dispatchedItems.clear(); KFileItemList orderedItems = m_pendingItems; orderItems(orderedItems); // Kill all suspended preview jobs. Usually when a preview job // has been finished, slotPreviewJobFinished() clears all item queues. // This is not wanted in this case, as a new job is created afterwards // for m_pendingItems. m_clearItemQueues = false; killPreviewJobs(); m_clearItemQueues = true; startPreviewJob(orderedItems); } void IconManager::replaceIcon(const KUrl& url, const QPixmap& pixmap) { Q_ASSERT(url.isValid()); if (!m_showPreview) { // the preview has been canceled in the meantime return; } // check whether the item is part of the directory lister (it is possible // that a preview from an old directory lister is received) KDirLister* dirLister = m_model->dirLister(); bool isOldPreview = true; const KUrl::List dirs = dirLister->directories(); const QString itemDir = url.directory(); foreach (const KUrl& url, dirs) { if (url.path() == itemDir) { isOldPreview = false; break; } } if (isOldPreview) { return; } const QModelIndex idx = m_model->indexForUrl(url); if (idx.isValid() && (idx.column() == 0)) { QPixmap icon = pixmap; const KFileItem item = m_model->itemForIndex(idx); const QString mimeType = item.mimetype(); const QString mimeTypeGroup = mimeType.left(mimeType.indexOf('/')); if ((mimeTypeGroup != "image") || !applyImageFrame(icon)) { limitToSize(icon, m_view->iconSize()); } m_model->setData(idx, QIcon(icon), Qt::DecorationRole); } } bool IconManager::applyImageFrame(QPixmap& icon) { const QSize maxSize = m_view->iconSize(); const bool applyFrame = (maxSize.width() > KIconLoader::SizeSmallMedium) && (maxSize.height() > KIconLoader::SizeSmallMedium) && ((icon.width() > KIconLoader::SizeLarge) || (icon.height() > KIconLoader::SizeLarge)); if (!applyFrame) { // the maximum size or the image itself is too small for a frame return false; } const int frame = 4; const int doubleFrame = frame * 2; // resize the icon to the maximum size minus the space required for the frame limitToSize(icon, QSize(maxSize.width() - doubleFrame, maxSize.height() - doubleFrame)); QPainter painter; const QPalette palette = m_view->palette(); QPixmap framedIcon(icon.size().width() + doubleFrame, icon.size().height() + doubleFrame); framedIcon.fill(palette.color(QPalette::Normal, QPalette::Base)); const int width = framedIcon.width() - 1; const int height = framedIcon.height() - 1; painter.begin(&framedIcon); painter.drawPixmap(frame, frame, icon); // add a border painter.setPen(palette.color(QPalette::Text)); painter.setBrush(Qt::NoBrush); painter.drawRect(0, 0, width, height); painter.drawRect(1, 1, width - 2, height - 2); // dim image frame by 12.5 % painter.setPen(QColor(0, 0, 0, 32)); painter.drawRect(frame, frame, width - doubleFrame, height - doubleFrame); painter.end(); icon = framedIcon; // provide an alpha channel for the border QPixmap alphaChannel(icon.size()); alphaChannel.fill(); QPainter alphaPainter(&alphaChannel); alphaPainter.setBrush(Qt::NoBrush); alphaPainter.setPen(QColor(32, 32, 32)); alphaPainter.drawRect(0, 0, width, height); alphaPainter.setPen(QColor(64, 64, 64)); alphaPainter.drawRect(1, 1, width - 2, height - 2); icon.setAlphaChannel(alphaChannel); return true; } void IconManager::limitToSize(QPixmap& icon, const QSize& maxSize) { if ((icon.width() > maxSize.width()) || (icon.height() > maxSize.height())) { icon = icon.scaled(maxSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); } } void IconManager::startPreviewJob(const KFileItemList& items) { if (items.count() == 0) { return; } const QSize size = m_view->iconSize(); KIO::PreviewJob* job = KIO::filePreview(items, 128, 128, 0, 70, true, true, &m_previewPlugins); connect(job, SIGNAL(gotPreview(const KFileItem&, const QPixmap&)), this, SLOT(addToPreviewQueue(const KFileItem&, const QPixmap&))); connect(job, SIGNAL(finished(KJob*)), this, SLOT(slotPreviewJobFinished(KJob*))); m_previewJobs.append(job); m_previewTimer->start(200); } void IconManager::killPreviewJobs() { foreach (KJob* job, m_previewJobs) { Q_ASSERT(job != 0); job->kill(); } m_previewJobs.clear(); } void IconManager::orderItems(KFileItemList& items) { // Order the items in a way that the preview for the visible items // is generated first, as this improves the feeled performance a lot. // // Implementation note: 2 different algorithms are used for the sorting. // Algorithm 1 is faster when having a lot of items in comparison // to the number of rows in the model. Algorithm 2 is faster // when having quite less items in comparison to the number of rows in // the model. Choosing the right algorithm is important when having directories // with several hundreds or thousands of items. const int itemCount = items.count(); const int rowCount = m_proxyModel->rowCount(); const QRect visibleArea = m_view->viewport()->rect(); if (itemCount * 10 > rowCount) { // Algorithm 1: The number of items is > 10 % of the row count. Parse all rows // and check whether the received row is part of the item list. for (int row = 0; row < rowCount; ++row) { const QModelIndex proxyIndex = m_proxyModel->index(row, 0); const QRect itemRect = m_view->visualRect(proxyIndex); const QModelIndex dirIndex = m_proxyModel->mapToSource(proxyIndex); KFileItem item = m_model->itemForIndex(dirIndex); // O(1) const KUrl url = item.url(); // check whether the item is part of the item list 'items' int index = -1; for (int i = 0; i < itemCount; ++i) { if (items[i].url() == url) { index = i; break; } } if ((index > 0) && itemRect.intersects(visibleArea)) { // The current item is (at least partly) visible. Move it // to the front of the list, so that the preview is // generated earlier. items.removeAt(index); items.insert(0, item); } } } else { // Algorithm 2: The number of items is <= 10 % of the row count. In this case iterate // all items and receive the corresponding row from the item. for (int i = 0; i < itemCount; ++i) { const QModelIndex dirIndex = m_model->indexForItem(items[i]); // O(n) (n = number of rows) const QModelIndex proxyIndex = m_proxyModel->mapFromSource(dirIndex); const QRect itemRect = m_view->visualRect(proxyIndex); if (itemRect.intersects(visibleArea)) { // The current item is (at least partly) visible. Move it // to the front of the list, so that the preview is // generated earlier. items.insert(0, items[i]); items.removeAt(i + 1); } } } } #include "iconmanager.moc" plasma-widget-quickaccess-0.8.1/quickaccessAppearanceConfig.ui000644 001750 001750 00000013715 11207307040 022716 0ustar00000000 000000 quickaccessAppearanceConfig 0 0 415 203 Form QFormLayout::FieldsStayAtSizeHint Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 0 0 Custom icon: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 0 0 48 0 0 Icon Size: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 16 22 32 48 64 128 0 0 View mode: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter List Mode Icon Mode Show tooltips Use a custom label Qt::Horizontal 40 20 false Label: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter customLabelEdit false 1 0 Qt::Vertical 20 13 KIconButton QPushButton
kicondialog.h
plasma-widget-quickaccess-0.8.1/popupdialog.cpp000644 001750 001750 00000026736 11207307143 020015 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include "popupdialog.h" //QT includes #include #include #include #include #include #include //KDE includes // #include #include #include #include //Plasma #include //local includes #include "itemview.h" #include "button.h" PopupDialog::PopupDialog(Settings *settings, QWidget * parent, Qt::WindowFlags f) :ResizeDialog(parent, f) ,m_settings(settings) ,m_label(0) ,m_start(KFileItem()) ,m_current(KFileItem()) ,m_view(0) ,m_model(0) ,m_proxyModel(0) ,m_iconManager(0) ,m_delegate(0) { setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint | Qt::Popup); //layout dialog QVBoxLayout *l_layoutVertical = new QVBoxLayout(this); l_layoutVertical->setSpacing( 0 ); l_layoutVertical->setMargin( 1 ); //create the Label and buttons QHBoxLayout *l_layoutHorizontal = new QHBoxLayout(); l_layoutHorizontal->setSpacing( 0 ); l_layoutHorizontal->setMargin( 1 ); l_layoutVertical->addLayout(l_layoutHorizontal); m_backButton = new Button(this); m_backButton->setIcon(KIcon("go-up")); l_layoutHorizontal->addWidget(m_backButton); m_backButton->setHidden(true); m_label = new Label(m_settings, this); l_layoutHorizontal->addWidget(m_label); m_sortButton = new Button(this); l_layoutHorizontal->addWidget(m_sortButton); m_sortGroup = new QActionGroup(this); //group->setExclusive(true); QAction *name = new QAction(i18n("Sort by Name"), m_sortGroup); name->setCheckable(true); name->setObjectName("name"); QAction *size = new QAction(i18n("Sort by Size"), m_sortGroup); size->setCheckable(true); size->setObjectName("size"); QAction *modified = new QAction(i18n("Sort by Last Modified"), m_sortGroup); modified->setCheckable(true); modified->setObjectName("modified"); if(m_settings->sortColumn() == KDirModel::Name){ name->setChecked(true); } else if(m_settings->sortColumn() == KDirModel::Size) { size->setChecked(true); } else { modified->setChecked(true); } m_sortMenu = new QMenu(this); m_sortMenu->addAction(name); m_sortMenu->addAction(size); m_sortMenu->addAction(modified); m_sortButton->setMenu(m_sortMenu); m_sortButton->setPopupMode(QToolButton::MenuButtonPopup); l_layoutVertical->addSpacing(5); //create the ItemView m_view = new ItemView(this); m_view->setFocus(); m_model = new DirModel(this); m_proxyModel = new KDirSortFilterProxyModel(this); m_proxyModel->setSourceModel(m_model); m_proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive); m_proxyModel->setFilterKeyColumn(0); m_view->setModel(m_proxyModel); m_delegate = new KFileItemDelegate(this); m_delegate->setShadowColor(Plasma::Theme::defaultTheme()->color(Plasma::Theme::BackgroundColor)); m_delegate->setShadowBlur(8); m_delegate->setShadowOffset(QPointF(0,0)); m_view->setItemDelegate(m_delegate); l_layoutVertical->addWidget(m_view); m_view->setIconSize(QSize(16,16));//IconManager needs a valid iconSize m_iconManager = new IconManager(m_view, m_proxyModel); m_view->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);//TODO remove connect(m_view, SIGNAL( signal_open(const QModelIndex &)), this, SLOT(slot_open(const QModelIndex&))); connect(m_label, SIGNAL( clicked() ), this, SLOT( open() ) ); connect(m_model->dirLister(), SIGNAL(completed()), m_view->viewport(), SLOT(update())); connect(m_settings, SIGNAL(settingsChanged(Settings::SettingsType)), this, SLOT(applySettings(Settings::SettingsType))); connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), SLOT(updateColors())); connect(m_backButton, SIGNAL(clicked()), m_view, SLOT(open())); connect(m_sortButton, SIGNAL(clicked()), this, SLOT(sortButtonClicked())); connect(m_sortGroup, SIGNAL(triggered(QAction*)), this, SLOT(slot_sortingTriggered())); } PopupDialog::~PopupDialog() { delete m_label; m_view->deleteLater(); delete m_model; delete m_proxyModel; delete m_iconManager; delete m_delegate; delete m_backButton; delete m_sortButton; } void PopupDialog::updateColors() { m_delegate->setShadowColor(Plasma::Theme::defaultTheme()->color(Plasma::Theme::BackgroundColor)); } void PopupDialog::applySettings(Settings::SettingsType type) { switch(type) { case Settings::IconSize: m_view->setIconSize(QSize(m_settings->iconSize(), m_settings->iconSize())); if(m_settings->showPreviews()) { m_model->dirLister()->stop(); m_model->dirLister()->openUrl(m_settings->url(), KDirLister::Reload); } break; case Settings::Preview: m_iconManager->setShowPreview(m_settings->showPreviews()); m_iconManager->setPreviewPlugins(m_settings->previewPlugins()); m_model->dirLister()->stop(); m_model->dirLister()->openUrl(m_settings->url(), KDirLister::Reload); break; case Settings::ShowHiddenFiles: m_model->dirLister()->setShowingDotFiles(m_settings->showHiddenFiles()); m_model->dirLister()->stop(); m_model->dirLister()->openUrl(m_settings->url(), KDirLister::Reload); break; case Settings::ShowOnlyDirs: m_model->dirLister()->setDirOnlyMode(m_settings->showOnlyDirs()); m_model->dirLister()->stop(); m_model->dirLister()->openUrl(m_settings->url(), KDirLister::Reload); break; case Settings::Filter: m_proxyModel->setFilterWildcard(m_settings->filter()); break; case Settings::Url: setStartUrl(m_settings->url()); break; case Settings::ToolTips: m_view->setShowToolTips(m_settings->showToolTips()); break; case Settings::ViewMode: m_view->setViewMode(m_settings->viewMode()); break; case Settings::Sorting: updateSorting(); break; case Settings::SingleClickNav: toggleSingleClick(); break; case Settings::DolphinSorting: break; case Settings::All: m_view->setIconSize(QSize(m_settings->iconSize(), m_settings->iconSize())); m_iconManager->setShowPreview(m_settings->showPreviews()); m_iconManager->setPreviewPlugins(m_settings->previewPlugins()); m_model->dirLister()->setShowingDotFiles(m_settings->showHiddenFiles()); m_model->dirLister()->setDirOnlyMode(m_settings->showOnlyDirs()); m_proxyModel->setFilterWildcard(m_settings->filter()); setStartUrl(m_settings->url()); m_view->setShowToolTips(m_settings->showToolTips()); m_view->setViewMode(m_settings->viewMode()); toggleSingleClick(); updateSorting(); break; default: break; } } void PopupDialog::toggleSingleClick() { if(m_settings->singleClickNavigation()) { m_view->disconnect(SIGNAL(doubleClicked(const QModelIndex &))); connect(m_view, SIGNAL(clicked(const QModelIndex &)), m_view, SLOT(open(const QModelIndex &))); } else { m_view->disconnect(SIGNAL(clicked(const QModelIndex &))); connect(m_view, SIGNAL(doubleClicked (const QModelIndex &)), m_view, SLOT(open(const QModelIndex &))); } } void PopupDialog::hideEvent ( QHideEvent * event ) { m_current = m_start; m_view->setRootIndex(QModelIndex()); m_view->selectionModel()->clear(); m_view->verticalScrollBar()->setValue(0); m_label->setFileItem(m_current); m_backButton->hide(); if(m_settings->enableDolphinSorting()) { checkDolphinSorting(&(m_current.url())); } QWidget::hideEvent( event ); emit signal_hide(); } void PopupDialog::setStartUrl(const KUrl &url) { if(m_settings->enableDolphinSorting()) checkDolphinSorting(&url); if( !m_model->dirLister()->openUrl( url ) ) kDebug() << "can not open url: " << url; connect(m_model->dirLister(), SIGNAL(completed()), this, SLOT(dirListerCompleted())); } void PopupDialog::dirListerCompleted() { disconnect(m_model->dirLister(), SIGNAL(completed()), this, SLOT(dirListerCompleted())); m_current = m_model->dirLister()->rootItem(); m_start = m_current; m_label->setFileItem(m_current); } void PopupDialog::open() { if ( !m_current.isNull() ) { m_current.run(); hide(); } } void PopupDialog::updateSorting() { if(m_settings->sortOrder() == Qt::AscendingOrder) { m_sortButton->setIcon(KIcon("view-sort-ascending")); } else { m_sortButton->setIcon(KIcon("view-sort-descending")); } m_proxyModel->sort(m_settings->sortColumn(), m_settings->sortOrder()); } void PopupDialog::slot_sortingTriggered() { QAction *triggered = m_sortGroup->checkedAction(); if(triggered->objectName() == "name") { m_settings->setSortColumn(KDirModel::Name); } else if(triggered->objectName() == "size") { m_settings->setSortColumn(KDirModel::Size); } else { m_settings->setSortColumn(KDirModel::ModifiedTime); } } void PopupDialog::sortButtonClicked() { if(m_settings->sortOrder() == Qt::AscendingOrder) { m_settings->setSortOrder(Qt::DescendingOrder); } else { m_settings->setSortOrder(Qt::AscendingOrder); } } void PopupDialog::slot_open(const QModelIndex &index) { if(index.isValid()) { m_backButton->show(); m_current = m_model->itemForIndex(m_proxyModel->mapToSource(index)); } else { m_backButton->hide(); m_current = m_start; } if(m_settings->enableDolphinSorting()) checkDolphinSorting(&(m_current.url())); if(m_current.isFile() || !m_settings->allowNavigation()) { m_current.run(); hide(); } m_label->setFileItem(m_current); } void PopupDialog::checkDolphinSorting(const KUrl *dir) { KConfig conf(dir->path(KUrl::AddTrailingSlash)+".directory"); KConfigGroup cg(&conf, "Dolphin"); int sortingType = cg.readEntry("Sorting", 0); int sortOrder = cg.readEntry("SortOrder", 0); if(sortingType == 0) { m_settings->setSortColumn(KDirModel::Name); } else if(sortingType == 1) { m_settings->setSortColumn(KDirModel::Size); } else if(sortingType == 2) { m_settings->setSortColumn(KDirModel::ModifiedTime); } else m_settings->setSortColumn(KDirModel::Name); //fallback for other dolphin's sorting types (like by permissions and so..) if(sortOrder == 1) { m_settings->setSortOrder(Qt::DescendingOrder); } else { m_settings->setSortOrder(Qt::AscendingOrder); } } #include "popupdialog.moc" plasma-widget-quickaccess-0.8.1/settings.cpp000644 001750 001750 00000020440 11207307143 017314 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include "settings.h" #include // #include Settings::Settings(QObject *parent) :QObject(parent) ,m_iconName("folder-favorites") ,m_iconSize(16) ,m_showPreviews(false) ,m_showHiddenFiles(false) ,m_showOnlyDirs(false) ,m_filter("*") ,m_customLabel("") ,m_showCustomLabel(false) ,m_url(QDir::homePath()) ,m_showToolTips(false) ,m_needsSaving(false) ,m_previewPlugins(QStringList() << "imagethumbnail") ,m_viewMode(ItemView::ListMode) ,m_allowNavigation(true) ,m_singleClickNavigation(true) ,m_enableDolphinSorting(false) ,m_sortOrder(Qt::AscendingOrder) ,m_sortColumn(KDirModel::Name) { } Settings::~Settings() { } void Settings::setIconName(const QString &name) { if(name != m_iconName) { m_iconName = name; m_needsSaving = true; emit settingsChanged(Settings::IconName); } } QString Settings::iconName() const { return m_iconName; } void Settings::setIconSize(const int &size) { if(size != m_iconSize) { m_iconSize = size; m_needsSaving = true; emit settingsChanged(Settings::IconSize); } } int Settings::iconSize() const { return m_iconSize; } void Settings::setShowPreviews(bool show) { if(show != m_showPreviews) { m_showPreviews = show; m_needsSaving = true; emit settingsChanged(Settings::Preview); } } bool Settings::showPreviews() { return m_showPreviews; } void Settings::setShowHiddenFiles(bool show) { if( show != m_showHiddenFiles) { m_showHiddenFiles = show; m_needsSaving = true; emit settingsChanged(Settings::ShowHiddenFiles); } } bool Settings::showHiddenFiles() { return m_showHiddenFiles; } void Settings::setShowOnlyDirs(bool show) { if(show != m_showOnlyDirs) { m_showOnlyDirs = show; m_needsSaving = true; emit settingsChanged(Settings::ShowOnlyDirs); } } bool Settings::showOnlyDirs() { return m_showOnlyDirs; } void Settings::setFilter(const QString &filter) { if(filter != m_filter) { m_filter = filter; m_needsSaving = true; emit settingsChanged(Settings::Filter); } } QString Settings::filter() const { return m_filter; } void Settings::setCustomLabel(const QString &label) { if(label != m_customLabel) { m_customLabel = label; m_needsSaving = true; emit settingsChanged(Settings::CustomLabel); } } QString Settings::customLabel() const { return m_customLabel; } void Settings::setUrl(const KUrl &url) { if(url != m_url) { m_url = url; m_needsSaving = true; emit settingsChanged(Settings::Url); } } KUrl Settings::url() const { return m_url; } void Settings::setShowCustomLabel(bool show) { if(show != m_showCustomLabel) { m_showCustomLabel = show; m_needsSaving = true; emit settingsChanged(Settings::CustomLabel); } } bool Settings::showCustomLabel() { return m_showCustomLabel; } void Settings::setPreviewPlugins(const QStringList &list) { if(list != m_previewPlugins) { m_previewPlugins = list; m_needsSaving = true; emit settingsChanged(Settings::Preview); } } QStringList Settings::previewPlugins() const { return m_previewPlugins; } void Settings::setShowToolTips(bool show) { if(show != m_showToolTips) { m_showToolTips = show; m_needsSaving = true; emit settingsChanged(Settings::ToolTips); } } bool Settings::showToolTips() { return m_showToolTips; } void Settings::setViewMode(ItemView::ViewMode mode) { if(mode != m_viewMode) { m_viewMode = mode; m_needsSaving = true; emit settingsChanged(Settings::ViewMode); } } ItemView::ViewMode Settings::viewMode() { return m_viewMode; } void Settings::setAllowNavigation(bool allow) { if(allow != m_allowNavigation) { m_allowNavigation = allow; m_needsSaving = true; } } bool Settings::allowNavigation() { return m_allowNavigation; } void Settings::setSingleClickNavigation(bool allow) { if(allow != m_singleClickNavigation) { m_singleClickNavigation = allow; m_needsSaving = true; emit settingsChanged(Settings::SingleClickNav); } } bool Settings::singleClickNavigation() { return m_singleClickNavigation; } void Settings::setEnableDolphinSorting(bool allow) { if(allow != m_enableDolphinSorting) { m_enableDolphinSorting = allow; m_needsSaving = true; emit settingsChanged(Settings::DolphinSorting); } } bool Settings::enableDolphinSorting() { return m_enableDolphinSorting; } void Settings::setSortOrder(Qt::SortOrder order) { if(order != m_sortOrder) { m_sortOrder = order; m_needsSaving = true; emit settingsChanged(Settings::Sorting); } } Qt::SortOrder Settings::sortOrder() { return m_sortOrder; } void Settings::setSortColumn(KDirModel::ModelColumns column) { if(column != m_sortColumn) { m_sortColumn = column; m_needsSaving = true; emit settingsChanged(Settings::Sorting); } } KDirModel::ModelColumns Settings::sortColumn() { return m_sortColumn; } bool Settings::needsSaving() { return m_needsSaving; } void Settings::readSettings(KConfigGroup *cg) { KUrl url(QDir::homePath()); m_url = cg->readEntry("url", url); m_iconName = cg->readEntry("icon", "folder-favorites"); m_iconSize = cg->readEntry("iconSize", 16); m_showPreviews = cg->readEntry("preview", false); m_showHiddenFiles = cg->readEntry("hidden", false); m_showOnlyDirs = cg->readEntry("onlyDirs", false); m_filter = cg->readEntry("filter", "*"); m_showCustomLabel = cg->readEntry("showCustomLabel", false); m_customLabel = cg->readEntry("customLabel", ""); m_previewPlugins = cg->readEntry("previewPlugins", QStringList() << "imagethumbnail"); m_showToolTips = cg->readEntry("ToolTips", false); m_viewMode = (ItemView::ViewMode)cg->readEntry("ViewMode", 0); m_allowNavigation = cg->readEntry("AllowNavigation", true); m_sortOrder = (Qt::SortOrder)cg->readEntry("sortOrder", 0); m_sortColumn = (KDirModel::ModelColumns)cg->readEntry("sortColumn", 0); m_singleClickNavigation = cg->readEntry("SingleClickNavigation", true); m_enableDolphinSorting = cg->readEntry("EnableDolphinSorting", false); //emit settingsChanged(Settings::All); } void Settings::saveSettings(KConfigGroup *cg) { cg->writeEntry("url", m_url); cg->writeEntry("icon", m_iconName); cg->writeEntry("iconSize", m_iconSize); cg->writeEntry("preview", m_showPreviews); cg->writeEntry("hidden", m_showHiddenFiles); cg->writeEntry("onlyDirs", m_showOnlyDirs); cg->writeEntry("filter", m_filter); cg->writeEntry("customLabel", m_customLabel); cg->writeEntry("showCustomLabel", m_showCustomLabel); cg->writeEntry("previewPlugins", m_previewPlugins); cg->writeEntry("ToolTips", m_showToolTips); cg->writeEntry("ViewMode", (int)m_viewMode); cg->writeEntry("AllowNavigation", m_allowNavigation); cg->writeEntry("sortOrder", (int)m_sortOrder); cg->writeEntry("sortColumn", (int)m_sortColumn); cg->writeEntry("SingleClickNavigation", m_singleClickNavigation); cg->writeEntry("EnableDolphinSorting", m_enableDolphinSorting); m_needsSaving = false; } #include "settings.moc" plasma-widget-quickaccess-0.8.1/effects.h000644 001750 001750 00000003107 11207307040 016535 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef Effects_HEADER #define Effects_HEADER namespace Effects { QPainterPath overlayPath(const QRect &rect); void drawOverlay(QPainter *painter, const QRect &rect); } //namespace Effects #endif //Effects_HEADER plasma-widget-quickaccess-0.8.1/ChangeLog000644 001750 001750 00000005253 11207316211 016523 0ustar00000000 000000 0.8.1: ------ -Fix a bug where the Dolphin sorting setting wasn't always respected -Update default QuickAccess icon for KDE 4.3. Dolphin sorting settings -New initial translations: +hu, ru (only 19% translated), tr (90% translated) 0.8: ---- -Add simple tooltip for the IconWidget -Use settings from Dolphin to determine wether or not to show copy/move to items in the context menu -Add option to use sorting settings from Dolphin; patch by mck182 -Add Single vs Double click setting; patch by mck182 -Revamp configuration interface. Tabs have been done away with and each tab now has its own section -Stylistic/typo fixes for various strings -Initially set the icon size to the configured size to avoid supersmall QuickAccess widgets on the desktop -Forward-port fix from 0.7.x branch to extract messages from .ui files for .po template generation -Add initial translations for: es, fr, gl, pt_BR, sv, and zh_CN languages. Everything except zh_CN should be fairly well translated. (zh_CN is only about 33% translated) 0.7.3: ------ -Add Messages.sh so translation templates can be extracted 0.7.2: ------ -Port build system to KDE 4.2 -Port plasma applet to KDE 4.2 -Fix crash where opening a folder before it was displayed (when popupdialog is first created) causes plasma to crash 0.7.1: ------ -fixed a bug which lets quickaccess/plasma crash if you didn't open the popupdialog before a dndevent 0.7: ---- -sorting -improved selection(by rubberband or shift/ctrl) -fixed a bug with invalid urls and changed default path to "~" -applet should now save the size if placed on the desktop -improved scrollinganimation -the popupdialog gets closed when an item in the contexmenu is triggered 0.6.1: ------ -fixed a bug with doubleclick settings(thanks for the report painkiller101) -fixed a bug where the icon in the panel remains highlighted -the listview now has by default keyboard focus -changed the width of the text in iconmode 0.6: ---- -changed the flipscrollview to an itemview that supports a listmode and an iconmode(idea by Marcel Nowaczyk aka painkiller101) -option to disable navigation(clicking on a folder opens dolphin/konqueror) -some visual changes(e.g. better readable text with transparent themes) 0.5.2: ------ -fixed a bug where the previewimagesize was not updated when the iconsize of the listview changed -tooltips are disabled by default -little changes in the itemheight 0.5.1: ------ -fixed a bug where the text in the listview was drawn under the triangle( thanks to painkiller101 for the hint) 0.5: ---- -ToolTip support -extracted the resizefunctionality into a base class -option to adjust which previewplugins should be used(by default only the imageplugin) -some visual "improvements" plasma-widget-quickaccess-0.8.1/pluginwidget.cpp000644 001750 001750 00000005075 11207307040 020161 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include // #include #include "pluginwidget.h" PluginWidget::PluginWidget(QWidget* parent, Qt::WindowFlags fl) :QWidget(parent, fl) { setupUi(this); //show(); m_model = new PluginModel(this); KFileItemDelegate *delegate = new KFileItemDelegate(this); availableView->setModel(m_model); availableView->setItemDelegate(delegate); connect(availableView, SIGNAL(clicked(const QModelIndex &)), this, SLOT(toggle(const QModelIndex &))); } PluginWidget::~PluginWidget() { } QStringList PluginWidget::activePlugins() const { QStringList list; for(int i = 0; i < m_model->rowCount(); ++i) { if(m_model->plugin(i)->active) list << m_model->plugin(i)->name; } return list; } void PluginWidget::setActivePlugins(const QStringList &list) { for(int i = 0; i < m_model->rowCount(); ++i) { for(int j = 0; j < list.count(); ++j) { if(m_model->plugin(i)->name == list.at(j)) { m_model->plugin(i)->active = true; } } } availableView->viewport()->update(); } void PluginWidget::toggle(const QModelIndex &index) { Plugin *plugin = m_model->plugin(index); plugin->active = !plugin->active; availableView->update(index); } #include "pluginwidget.moc" plasma-widget-quickaccess-0.8.1/quickaccess.cpp000644 001750 001750 00000025437 11207307143 017765 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include "quickaccess.h" //Qt includes #include #include //KDE includes #include //#include #include #include #include #include //Plasma #include QuickAccess::QuickAccess(QObject *parent, const QVariantList &args) :Plasma::Applet(parent, args) ,m_settings(new Settings(this)) ,m_icon(new Plasma::IconWidget(this)) ,m_dialog(0) ,m_dialogSize(QSize()) ,m_dragOver(false) ,m_saveTimer(new QTimer(this)) { setHasConfigurationInterface(true); setAcceptDrops(true); m_saveTimer->setSingleShot(true); } QuickAccess::~QuickAccess() { if (hasFailedToLaunch()) { // Do some cleanup here } else { saveSettings(); if(m_dialog) { delete m_dialog; } } delete m_icon; delete m_settings; delete m_saveTimer; } void QuickAccess::init() { /*// A small demonstration of the setFailedToLaunch function if (m_icon.isNull()) { setFailedToLaunch(true, "No world to say hello"); } else { }*/ //setup the layout QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(this); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); connect(m_icon, SIGNAL(clicked()), this, SLOT(slot_iconClicked())); layout->addItem(m_icon); Plasma::ToolTipManager::self()->registerWidget(this); //read the config KConfigGroup cg = config(); m_dialogSize = cg.readEntry("dialogSize", QSize(300,400)); m_settings->readSettings(&cg); connect(m_settings, SIGNAL(settingsChanged(Settings::SettingsType)), this, SLOT(applySettings(Settings::SettingsType))); m_icon->setIcon(m_settings->iconName()); resize(m_icon->iconSize()); update(); registerAsDragHandle(m_icon); setAspectRatioMode(Plasma::ConstrainedSquare); connect(m_saveTimer, SIGNAL(timeout()), this, SLOT(saveSettings())); } void QuickAccess::popupEvent(bool show) { if (show) { Plasma::ToolTipManager::self()->clearContent(this); } } void QuickAccess::toolTipAboutToShow() { Plasma::ToolTipContent toolTip; toolTip.setMainText(i18n("QuickAccess Browser")); toolTip.setSubText(i18n("Quickly browse folders on your computer")); toolTip.setImage(KIcon(m_settings->iconName())); Plasma::ToolTipManager::self()->setContent(this, toolTip); } void QuickAccess::toolTipHidden() { Plasma::ToolTipManager::self()->clearContent(this); } void QuickAccess::applySettings(Settings::SettingsType type) { if(type == Settings::IconName || type == Settings::All) { m_icon->setIcon(m_settings->iconName()); update(); } if(!m_saveTimer->isActive()) { m_saveTimer->start(600000); //10 minutes } } void QuickAccess::saveSettings() { KConfigGroup cg = config(); bool save = false; if(m_settings->needsSaving()){ save = true; m_settings->saveSettings(&cg); } if(m_dialog) { if(m_dialog->size() != m_dialogSize) { save = true; m_dialogSize = m_dialog->size(); cg.writeEntry("dialogSize", m_dialogSize); } } if(save) { emit configNeedsSaving(); } } void QuickAccess::createConfigurationInterface(KConfigDialog *parent) { QWidget *widgetGeneral = new QWidget; QWidget *widgetAppearance = new QWidget; QWidget *widgetPreview = new QWidget; uiGeneral.setupUi(widgetGeneral); uiAppearance.setupUi(widgetAppearance); uiPreview.setupUi(widgetPreview); pluginWidget = new PluginWidget(widgetPreview); uiGeneral.urlRequester->setMode(KFile::Directory | KFile::ExistingOnly); uiGeneral.urlRequester->setUrl(m_settings->url()); uiGeneral.filterEdit->setText(m_settings->filter()); uiGeneral.hiddenBox->setChecked(m_settings->showHiddenFiles()); uiGeneral.onlyDirsBox->setChecked(m_settings->showOnlyDirs()); uiGeneral.navigationBox->setChecked(m_settings->allowNavigation()); uiGeneral.singleClickBox->setChecked(m_settings->singleClickNavigation()); uiGeneral.dolphinSortingBox->setChecked(m_settings->enableDolphinSorting()); uiAppearance.customLabelEdit->setEnabled(uiAppearance.customLabelBox->isChecked()); uiAppearance.iconbutton->setIcon(m_settings->iconName()); uiAppearance.iconbutton->setIconType(KIconLoader::NoGroup, KIconLoader::Place); uiAppearance.iconSizeCombo->setCurrentIndex(uiAppearance.iconSizeCombo->findText( QString::number(m_settings->iconSize()) )); if(m_settings->viewMode() == ItemView::ListMode) { uiAppearance.viewModeCombo->setCurrentIndex(0); } else { uiAppearance.viewModeCombo->setCurrentIndex(1); } uiAppearance.viewModeCombo->setItemIcon(0, KIcon("view-list-details")); uiAppearance.viewModeCombo->setItemIcon(1, KIcon("view-list-icons")); uiPreview.previewBox->setChecked(m_settings->showPreviews()); //disable the previewplugins options when previews are disabled if(!m_settings->showPreviews()) { uiPreview.previewLabel1->setEnabled(false); uiPreview.previewLabel2->setEnabled(false); pluginWidget->setEnabled(false); } if(!m_settings->showCustomLabel()) { uiAppearance.customLabelBox->setChecked(false); } else { uiAppearance.customLabelBox->setChecked(true); uiAppearance.customLabel->setEnabled(true); uiAppearance.customLabelEdit->setEnabled(true); uiAppearance.customLabelEdit->setText(m_settings->customLabel()); } uiAppearance.tooltipBox->setChecked(m_settings->showToolTips()); pluginWidget->setActivePlugins(m_settings->previewPlugins()); uiPreview.pluginLayout->addWidget(pluginWidget); parent->addPage(widgetGeneral, i18nc("Title of the page that lets the user choose which location the quickaccess should show", "General"), "folder-favorites"); parent->addPage(widgetAppearance, i18nc("Title of the page that lets the user choose how the quickaccess should be shown", "Appearance"), "preferences-desktop-display"); parent->addPage(widgetPreview, i18nc("Title of the page that lets the user choose which filetypes should be previewed", "Preview"), "document-preview"); parent->setButtons(KDialog::Ok | KDialog::Cancel | KDialog::Apply); connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted())); connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted())); connect(uiAppearance.customLabelBox, SIGNAL(toggled(bool)), this, SLOT(showCustomLabelToggled(bool))); connect(uiPreview.previewBox, SIGNAL(toggled(bool)), this, SLOT(showPreviewToggled(bool))); } void QuickAccess::configAccepted() { KUrl url = uiGeneral.urlRequester->url(); url.adjustPath(KUrl::RemoveTrailingSlash); if(url.protocol() == "applications") { KMessageBox::sorry(uiGeneral.urlRequester, i18n("Sorry, but the \"applications:\" KIO slave is not supported, because it will crash QuickAccess/Plasma...")); } else { m_settings->setUrl(url); } m_settings->setIconName(uiAppearance.iconbutton->icon()); m_settings->setIconSize(uiAppearance.iconSizeCombo->currentText().toInt()); m_settings->setShowPreviews(uiPreview.previewBox->isChecked()); m_settings->setShowHiddenFiles(uiGeneral.hiddenBox->isChecked()); m_settings->setShowOnlyDirs(uiGeneral.onlyDirsBox->isChecked()); m_settings->setAllowNavigation(uiGeneral.navigationBox->isChecked()); m_settings->setSingleClickNavigation(uiGeneral.singleClickBox->isChecked()); m_settings->setFilter(uiGeneral.filterEdit->text()); m_settings->setShowCustomLabel(uiAppearance.customLabelBox->isChecked()); m_settings->setCustomLabel(uiAppearance.customLabelEdit->text()); m_settings->setShowToolTips(uiAppearance.tooltipBox->isChecked()); m_settings->setEnableDolphinSorting(uiGeneral.dolphinSortingBox->isChecked()); QStringList list = pluginWidget->activePlugins(); qSort(list); //sort it... m_settings->setPreviewPlugins(list); if(uiAppearance.viewModeCombo->currentIndex() == 0) { m_settings->setViewMode(ItemView::ListMode); } else { m_settings->setViewMode(ItemView::IconMode); } } void QuickAccess::showCustomLabelToggled(bool checked) { uiAppearance.customLabel->setEnabled(checked); uiAppearance.customLabelEdit->setEnabled(checked); } void QuickAccess::showPreviewToggled(bool checked) { uiPreview.previewLabel1->setEnabled(checked); uiPreview.previewLabel2->setEnabled(checked); pluginWidget->setEnabled(checked); } PopupDialog* QuickAccess::dialog() { if(!m_dialog) { //create the dialog m_dialog = new PopupDialog(m_settings); m_dialog->resize(m_dialogSize); m_dialog->applySettings(Settings::All); connect(m_dialog, SIGNAL(signal_hide()), m_icon, SLOT(setUnpressed())); } return m_dialog; } void QuickAccess::dragEnterEvent(QGraphicsSceneDragDropEvent *event) { event->setAccepted(event->mimeData()->hasUrls()); m_dragOver = true; QTimer::singleShot(DRAG_ENTER_TIME, this, SLOT(slotDragEvent())); } void QuickAccess::dragLeaveEvent(QGraphicsSceneDragDropEvent *event) { Q_UNUSED(event); m_dragOver = false; } void QuickAccess::dropEvent(QGraphicsSceneDragDropEvent *event) { m_dragOver = false; KFileItem item = dialog()->startItem(); QDropEvent ev(event->screenPos(), event->dropAction(), event->mimeData(), event->buttons(), event->modifiers()); KonqOperations::doDrop(item, item.url(), &ev, event->widget()); } //SLOTS: void QuickAccess::slotDragEvent() { if(!m_dragOver) { return; } dialog()->move(popupPosition(dialog()->size())); dialog()->show(); } void QuickAccess::slot_iconClicked() { if(!dialog()->isVisible()) { m_icon->setPressed(true); dialog()->move(popupPosition(dialog()->size())); dialog()->show(); } } #include "quickaccess.moc" plasma-widget-quickaccess-0.8.1/po/000755 001750 001750 00000000000 11207307040 015362 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/po/nl/000755 001750 001750 00000000000 11207307040 015773 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/po/nl/plasma_applet_quickaccess.po000644 001750 001750 00000013723 11207307040 023541 0ustar00000000 000000 # Dutch translation for plasma-widget-quickaccess # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the plasma-widget-quickaccess package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: plasma-widget-quickaccess\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-04-12 03:44+0000\n" "PO-Revision-Date: 2009-04-21 06:06+0000\n" "Last-Translator: cumulus007 \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-04-21 11:56+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: label.cpp:44 msgid "Open" msgstr "Openen" #: popupdialog.cpp:87 msgid "Sort by name" msgstr "Op naam sorteren" #: popupdialog.cpp:90 msgid "Sort by size" msgstr "op grootte sorteren" #: popupdialog.cpp:93 msgid "Sort by last modified" msgstr "Op datum sorteren" #: quickaccess.cpp:207 msgid "" "Sorry, but the \"applications:\" KIO slave is not supported, because it will " "crash QuickAccess/Plasma..." msgstr "" "Excuses, de KIO-slave \"applications:\" wordt niet ondersteund. Dit " "veroorzaakt onstabiliteit in Plasma." #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #: rc.cpp:3 rc.cpp:6 rc.cpp:84 rc.cpp:87 msgid "Form" msgstr "" #. i18n: file: quickaccessConfig.ui:28 #. i18n: ectx: attribute (title), widget (QWidget, general) #: rc.cpp:9 rc.cpp:90 msgid "General" msgstr "Algemeen" #. i18n: file: quickaccessConfig.ui:39 #. i18n: ectx: property (text), widget (QLabel, selectLabel) #: rc.cpp:12 rc.cpp:93 msgid "Directory:" msgstr "Map:" #. i18n: file: quickaccessConfig.ui:62 #. i18n: ectx: property (text), widget (QLabel, filterLabel) #: rc.cpp:15 rc.cpp:96 msgid "Filters:" msgstr "Filters:" #. i18n: file: quickaccessConfig.ui:104 #. i18n: ectx: property (text), widget (QCheckBox, hiddenBox) #: rc.cpp:18 rc.cpp:99 msgid "Show hidden files" msgstr "Verborgen bestanden weergeven" #. i18n: file: quickaccessConfig.ui:111 #. i18n: ectx: property (text), widget (QCheckBox, onlyDirsBox) #: rc.cpp:21 rc.cpp:102 msgid "Show only folders" msgstr "Alleen mappen tonen" #. i18n: file: quickaccessConfig.ui:118 #. i18n: ectx: property (text), widget (QCheckBox, navigationBox) #: rc.cpp:24 rc.cpp:105 msgid "Allow navigation" msgstr "Bladeren toestaan" #. i18n: file: quickaccessConfig.ui:147 #. i18n: ectx: attribute (title), widget (QWidget, appearance) #: rc.cpp:27 rc.cpp:108 msgid "Appearance" msgstr "Uiterlijk" #. i18n: file: quickaccessConfig.ui:170 #. i18n: ectx: property (text), widget (QLabel, label_2) #: rc.cpp:30 rc.cpp:111 msgid "Custom icon:" msgstr "Aangepast pictogram:" #. i18n: file: quickaccessConfig.ui:199 #. i18n: ectx: property (text), widget (QLabel, label) #: rc.cpp:33 rc.cpp:114 msgid "Icon SIze:" msgstr "Pictogramgrootte:" #. i18n: file: quickaccessConfig.ui:210 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:36 rc.cpp:117 msgid "16" msgstr "16" #. i18n: file: quickaccessConfig.ui:215 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:39 rc.cpp:120 msgid "22" msgstr "22" #. i18n: file: quickaccessConfig.ui:220 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:42 rc.cpp:123 msgid "32" msgstr "32" #. i18n: file: quickaccessConfig.ui:225 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:45 rc.cpp:126 msgid "48" msgstr "48" #. i18n: file: quickaccessConfig.ui:230 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:48 rc.cpp:129 msgid "64" msgstr "64" #. i18n: file: quickaccessConfig.ui:235 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:51 rc.cpp:132 msgid "128" msgstr "128" #. i18n: file: quickaccessConfig.ui:249 #. i18n: ectx: property (text), widget (QLabel, label_3) #: rc.cpp:54 rc.cpp:135 msgid "View mode:" msgstr "Weergavemodus:" #. i18n: file: quickaccessConfig.ui:260 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:57 rc.cpp:138 msgid "List mode" msgstr "Lijst" #. i18n: file: quickaccessConfig.ui:265 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:60 rc.cpp:141 msgid "Icon mode" msgstr "Pictogrammen" #. i18n: file: quickaccessConfig.ui:275 #. i18n: ectx: property (text), widget (QCheckBox, tooltipBox) #: rc.cpp:63 rc.cpp:144 msgid "Show tooltips" msgstr "Tekstballonnen tonen" #. i18n: file: quickaccessConfig.ui:282 #. i18n: ectx: property (text), widget (QCheckBox, customLabelBox) #: rc.cpp:66 rc.cpp:147 msgid "Use a custom Label" msgstr "Een aangepast label gebruiken" #. i18n: file: quickaccessConfig.ui:307 #. i18n: ectx: property (text), widget (QLabel, customLabel) #: rc.cpp:69 rc.cpp:150 msgid "Label:" msgstr "Label:" #. i18n: file: quickaccessConfig.ui:357 #. i18n: ectx: attribute (title), widget (QWidget, preview) #: rc.cpp:72 rc.cpp:153 msgid "Preview" msgstr "Voorbeeldweergave" #. i18n: file: quickaccessConfig.ui:363 #. i18n: ectx: property (text), widget (QCheckBox, previewBox) #: rc.cpp:75 rc.cpp:156 msgid "Show Previews" msgstr "Voorbeelden tonen" #. i18n: file: quickaccessConfig.ui:377 #. i18n: ectx: property (text), widget (QLabel, previewLabel1) #: rc.cpp:78 rc.cpp:159 msgid "Preview plugins:" msgstr "Voorbeeldplug-ins:" #. i18n: file: quickaccessConfig.ui:386 #. i18n: ectx: property (text), widget (QLabel, previewLabel2) #: rc.cpp:81 rc.cpp:162 msgid "Here you can enable/disable the plugins." msgstr "Hier kunt u plug-ins in- en uitschakelen." plasma-widget-quickaccess-0.8.1/po/nl/CMakeLists.txt000644 001750 001750 00000000163 11207307040 020533 0ustar00000000 000000 file(GLOB _po_files *.po) GETTEXT_PROCESS_PO_FILES(nl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) plasma-widget-quickaccess-0.8.1/po/pt_BR/000755 001750 001750 00000000000 11207307040 016370 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/po/pt_BR/plasma_applet_quickaccess.po000644 001750 001750 00000014142 11207307040 024132 0ustar00000000 000000 # Brazilian Portuguese translation for plasma-widget-quickaccess # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the plasma-widget-quickaccess package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: plasma-widget-quickaccess\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-04-12 03:44+0000\n" "PO-Revision-Date: 2009-04-12 01:51+0000\n" "Last-Translator: André Gondim \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-04-20 20:00+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: label.cpp:44 msgid "Open" msgstr "Abrir" #: popupdialog.cpp:87 msgid "Sort by name" msgstr "Ordenar por nome" #: popupdialog.cpp:90 msgid "Sort by size" msgstr "Ordenar por tamanho" #: popupdialog.cpp:93 msgid "Sort by last modified" msgstr "Ordenar por última modificação" #: quickaccess.cpp:207 msgid "" "Sorry, but the \"applications:\" KIO slave is not supported, because it will " "crash QuickAccess/Plasma..." msgstr "" "Desculpe, mas os \"aplicativos\":\" KIO slave não são suportadas, porque " "elas irão travar o QuickAcess/Plasma..." #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #: rc.cpp:3 rc.cpp:6 rc.cpp:84 rc.cpp:87 msgid "Form" msgstr "Formulários" #. i18n: file: quickaccessConfig.ui:28 #. i18n: ectx: attribute (title), widget (QWidget, general) #: rc.cpp:9 rc.cpp:90 msgid "General" msgstr "Geral" #. i18n: file: quickaccessConfig.ui:39 #. i18n: ectx: property (text), widget (QLabel, selectLabel) #: rc.cpp:12 rc.cpp:93 msgid "Directory:" msgstr "Diretório:" #. i18n: file: quickaccessConfig.ui:62 #. i18n: ectx: property (text), widget (QLabel, filterLabel) #: rc.cpp:15 rc.cpp:96 msgid "Filters:" msgstr "Filtros:" #. i18n: file: quickaccessConfig.ui:104 #. i18n: ectx: property (text), widget (QCheckBox, hiddenBox) #: rc.cpp:18 rc.cpp:99 msgid "Show hidden files" msgstr "Mostrar arquivos ocultos" #. i18n: file: quickaccessConfig.ui:111 #. i18n: ectx: property (text), widget (QCheckBox, onlyDirsBox) #: rc.cpp:21 rc.cpp:102 msgid "Show only folders" msgstr "Mostrar somente diretórios" #. i18n: file: quickaccessConfig.ui:118 #. i18n: ectx: property (text), widget (QCheckBox, navigationBox) #: rc.cpp:24 rc.cpp:105 msgid "Allow navigation" msgstr "Permitir navegação" #. i18n: file: quickaccessConfig.ui:147 #. i18n: ectx: attribute (title), widget (QWidget, appearance) #: rc.cpp:27 rc.cpp:108 msgid "Appearance" msgstr "Aparência" #. i18n: file: quickaccessConfig.ui:170 #. i18n: ectx: property (text), widget (QLabel, label_2) #: rc.cpp:30 rc.cpp:111 msgid "Custom icon:" msgstr "Ícone personalizado:" #. i18n: file: quickaccessConfig.ui:199 #. i18n: ectx: property (text), widget (QLabel, label) #: rc.cpp:33 rc.cpp:114 msgid "Icon SIze:" msgstr "Tamanho do Ícone:" #. i18n: file: quickaccessConfig.ui:210 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:36 rc.cpp:117 msgid "16" msgstr "16" #. i18n: file: quickaccessConfig.ui:215 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:39 rc.cpp:120 msgid "22" msgstr "22" #. i18n: file: quickaccessConfig.ui:220 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:42 rc.cpp:123 msgid "32" msgstr "32" #. i18n: file: quickaccessConfig.ui:225 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:45 rc.cpp:126 msgid "48" msgstr "48" #. i18n: file: quickaccessConfig.ui:230 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:48 rc.cpp:129 msgid "64" msgstr "64" #. i18n: file: quickaccessConfig.ui:235 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:51 rc.cpp:132 msgid "128" msgstr "128" #. i18n: file: quickaccessConfig.ui:249 #. i18n: ectx: property (text), widget (QLabel, label_3) #: rc.cpp:54 rc.cpp:135 msgid "View mode:" msgstr "Modo de exibição:" #. i18n: file: quickaccessConfig.ui:260 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:57 rc.cpp:138 msgid "List mode" msgstr "Modo lista" #. i18n: file: quickaccessConfig.ui:265 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:60 rc.cpp:141 msgid "Icon mode" msgstr "Modo ícone" #. i18n: file: quickaccessConfig.ui:275 #. i18n: ectx: property (text), widget (QCheckBox, tooltipBox) #: rc.cpp:63 rc.cpp:144 msgid "Show tooltips" msgstr "Mostrar dicas de ferramentas" #. i18n: file: quickaccessConfig.ui:282 #. i18n: ectx: property (text), widget (QCheckBox, customLabelBox) #: rc.cpp:66 rc.cpp:147 msgid "Use a custom Label" msgstr "Usar um rótulo personalizado" #. i18n: file: quickaccessConfig.ui:307 #. i18n: ectx: property (text), widget (QLabel, customLabel) #: rc.cpp:69 rc.cpp:150 msgid "Label:" msgstr "Rótulo:" #. i18n: file: quickaccessConfig.ui:357 #. i18n: ectx: attribute (title), widget (QWidget, preview) #: rc.cpp:72 rc.cpp:153 msgid "Preview" msgstr "Pré-visualização" #. i18n: file: quickaccessConfig.ui:363 #. i18n: ectx: property (text), widget (QCheckBox, previewBox) #: rc.cpp:75 rc.cpp:156 msgid "Show Previews" msgstr "Mostrar Pré-visualizações" #. i18n: file: quickaccessConfig.ui:377 #. i18n: ectx: property (text), widget (QLabel, previewLabel1) #: rc.cpp:78 rc.cpp:159 msgid "Preview plugins:" msgstr "Plug-ins de pré-visualização:" #. i18n: file: quickaccessConfig.ui:386 #. i18n: ectx: property (text), widget (QLabel, previewLabel2) #: rc.cpp:81 rc.cpp:162 msgid "Here you can enable/disable the plugins." msgstr "Aqui você pode habilitar/desabilitar os plug-ins." plasma-widget-quickaccess-0.8.1/po/pt_BR/CMakeLists.txt000644 001750 001750 00000000166 11207307040 021133 0ustar00000000 000000 file(GLOB _po_files *.po) GETTEXT_PROCESS_PO_FILES(pt_BR ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) plasma-widget-quickaccess-0.8.1/po/zh_CN/000755 001750 001750 00000000000 11207307040 016363 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/po/zh_CN/plasma_applet_quickaccess.po000644 001750 001750 00000013313 11207307040 024124 0ustar00000000 000000 # Simplified Chinese translation for plasma-widget-quickaccess # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the plasma-widget-quickaccess package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: plasma-widget-quickaccess\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-04-12 03:44+0000\n" "PO-Revision-Date: 2009-04-11 05:17+0000\n" "Last-Translator: zhangmiao \n" "Language-Team: Simplified Chinese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-04-20 20:00+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: label.cpp:44 msgid "Open" msgstr "打开" #: popupdialog.cpp:87 msgid "Sort by name" msgstr "按名称排序" #: popupdialog.cpp:90 msgid "Sort by size" msgstr "按大小排序" #: popupdialog.cpp:93 msgid "Sort by last modified" msgstr "按最后修改时间排序" #: quickaccess.cpp:207 msgid "" "Sorry, but the \"applications:\" KIO slave is not supported, because it will " "crash QuickAccess/Plasma..." msgstr "" #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #: rc.cpp:3 rc.cpp:6 rc.cpp:84 rc.cpp:87 msgid "Form" msgstr "表格" #. i18n: file: quickaccessConfig.ui:28 #. i18n: ectx: attribute (title), widget (QWidget, general) #: rc.cpp:9 rc.cpp:90 msgid "General" msgstr "常规" #. i18n: file: quickaccessConfig.ui:39 #. i18n: ectx: property (text), widget (QLabel, selectLabel) #: rc.cpp:12 rc.cpp:93 msgid "Directory:" msgstr "目录:" #. i18n: file: quickaccessConfig.ui:62 #. i18n: ectx: property (text), widget (QLabel, filterLabel) #: rc.cpp:15 rc.cpp:96 msgid "Filters:" msgstr "" #. i18n: file: quickaccessConfig.ui:104 #. i18n: ectx: property (text), widget (QCheckBox, hiddenBox) #: rc.cpp:18 rc.cpp:99 msgid "Show hidden files" msgstr "显示隐藏文件" #. i18n: file: quickaccessConfig.ui:111 #. i18n: ectx: property (text), widget (QCheckBox, onlyDirsBox) #: rc.cpp:21 rc.cpp:102 msgid "Show only folders" msgstr "只显示文件夹" #. i18n: file: quickaccessConfig.ui:118 #. i18n: ectx: property (text), widget (QCheckBox, navigationBox) #: rc.cpp:24 rc.cpp:105 msgid "Allow navigation" msgstr "" #. i18n: file: quickaccessConfig.ui:147 #. i18n: ectx: attribute (title), widget (QWidget, appearance) #: rc.cpp:27 rc.cpp:108 msgid "Appearance" msgstr "外观" #. i18n: file: quickaccessConfig.ui:170 #. i18n: ectx: property (text), widget (QLabel, label_2) #: rc.cpp:30 rc.cpp:111 msgid "Custom icon:" msgstr "自定义图标:" #. i18n: file: quickaccessConfig.ui:199 #. i18n: ectx: property (text), widget (QLabel, label) #: rc.cpp:33 rc.cpp:114 msgid "Icon SIze:" msgstr "图标大小:" #. i18n: file: quickaccessConfig.ui:210 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:36 rc.cpp:117 msgid "16" msgstr "16" #. i18n: file: quickaccessConfig.ui:215 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:39 rc.cpp:120 msgid "22" msgstr "22" #. i18n: file: quickaccessConfig.ui:220 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:42 rc.cpp:123 msgid "32" msgstr "32" #. i18n: file: quickaccessConfig.ui:225 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:45 rc.cpp:126 msgid "48" msgstr "48" #. i18n: file: quickaccessConfig.ui:230 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:48 rc.cpp:129 msgid "64" msgstr "64" #. i18n: file: quickaccessConfig.ui:235 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:51 rc.cpp:132 msgid "128" msgstr "128" #. i18n: file: quickaccessConfig.ui:249 #. i18n: ectx: property (text), widget (QLabel, label_3) #: rc.cpp:54 rc.cpp:135 msgid "View mode:" msgstr "视图模式:" #. i18n: file: quickaccessConfig.ui:260 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:57 rc.cpp:138 msgid "List mode" msgstr "" #. i18n: file: quickaccessConfig.ui:265 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:60 rc.cpp:141 msgid "Icon mode" msgstr "" #. i18n: file: quickaccessConfig.ui:275 #. i18n: ectx: property (text), widget (QCheckBox, tooltipBox) #: rc.cpp:63 rc.cpp:144 msgid "Show tooltips" msgstr "" #. i18n: file: quickaccessConfig.ui:282 #. i18n: ectx: property (text), widget (QCheckBox, customLabelBox) #: rc.cpp:66 rc.cpp:147 msgid "Use a custom Label" msgstr "" #. i18n: file: quickaccessConfig.ui:307 #. i18n: ectx: property (text), widget (QLabel, customLabel) #: rc.cpp:69 rc.cpp:150 msgid "Label:" msgstr "标签:" #. i18n: file: quickaccessConfig.ui:357 #. i18n: ectx: attribute (title), widget (QWidget, preview) #: rc.cpp:72 rc.cpp:153 msgid "Preview" msgstr "预览" #. i18n: file: quickaccessConfig.ui:363 #. i18n: ectx: property (text), widget (QCheckBox, previewBox) #: rc.cpp:75 rc.cpp:156 msgid "Show Previews" msgstr "" #. i18n: file: quickaccessConfig.ui:377 #. i18n: ectx: property (text), widget (QLabel, previewLabel1) #: rc.cpp:78 rc.cpp:159 msgid "Preview plugins:" msgstr "" #. i18n: file: quickaccessConfig.ui:386 #. i18n: ectx: property (text), widget (QLabel, previewLabel2) #: rc.cpp:81 rc.cpp:162 msgid "Here you can enable/disable the plugins." msgstr "" plasma-widget-quickaccess-0.8.1/po/zh_CN/CMakeLists.txt000644 001750 001750 00000000166 11207307040 021126 0ustar00000000 000000 file(GLOB _po_files *.po) GETTEXT_PROCESS_PO_FILES(zh_CN ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) plasma-widget-quickaccess-0.8.1/po/sv/000755 001750 001750 00000000000 11207307040 016012 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/po/sv/plasma_applet_quickaccess.po000644 001750 001750 00000013764 11207307040 023565 0ustar00000000 000000 # Swedish translation for plasma-widget-quickaccess # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the plasma-widget-quickaccess package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: plasma-widget-quickaccess\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-04-12 03:44+0000\n" "PO-Revision-Date: 2009-04-09 07:34+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-04-20 20:00+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: label.cpp:44 msgid "Open" msgstr "Öppna" #: popupdialog.cpp:87 msgid "Sort by name" msgstr "Sortera efter namn" #: popupdialog.cpp:90 msgid "Sort by size" msgstr "Sortera efter storlek" #: popupdialog.cpp:93 msgid "Sort by last modified" msgstr "Sortera efter senast ändrade" #: quickaccess.cpp:207 msgid "" "Sorry, but the \"applications:\" KIO slave is not supported, because it will " "crash QuickAccess/Plasma..." msgstr "" "Tyvärr, men KIO-slaven \"application:\" stöds inte därför att det kommer att " "krascha QuickAccess/Plasma..." #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #: rc.cpp:3 rc.cpp:6 rc.cpp:84 rc.cpp:87 msgid "Form" msgstr "Formulär" #. i18n: file: quickaccessConfig.ui:28 #. i18n: ectx: attribute (title), widget (QWidget, general) #: rc.cpp:9 rc.cpp:90 msgid "General" msgstr "Allmänt" #. i18n: file: quickaccessConfig.ui:39 #. i18n: ectx: property (text), widget (QLabel, selectLabel) #: rc.cpp:12 rc.cpp:93 msgid "Directory:" msgstr "Katalog:" #. i18n: file: quickaccessConfig.ui:62 #. i18n: ectx: property (text), widget (QLabel, filterLabel) #: rc.cpp:15 rc.cpp:96 msgid "Filters:" msgstr "Filter:" #. i18n: file: quickaccessConfig.ui:104 #. i18n: ectx: property (text), widget (QCheckBox, hiddenBox) #: rc.cpp:18 rc.cpp:99 msgid "Show hidden files" msgstr "Visa dolda filer" #. i18n: file: quickaccessConfig.ui:111 #. i18n: ectx: property (text), widget (QCheckBox, onlyDirsBox) #: rc.cpp:21 rc.cpp:102 msgid "Show only folders" msgstr "Visa endast mappar" #. i18n: file: quickaccessConfig.ui:118 #. i18n: ectx: property (text), widget (QCheckBox, navigationBox) #: rc.cpp:24 rc.cpp:105 msgid "Allow navigation" msgstr "Tillåt navigering" #. i18n: file: quickaccessConfig.ui:147 #. i18n: ectx: attribute (title), widget (QWidget, appearance) #: rc.cpp:27 rc.cpp:108 msgid "Appearance" msgstr "Utseende" #. i18n: file: quickaccessConfig.ui:170 #. i18n: ectx: property (text), widget (QLabel, label_2) #: rc.cpp:30 rc.cpp:111 msgid "Custom icon:" msgstr "Egen ikon:" #. i18n: file: quickaccessConfig.ui:199 #. i18n: ectx: property (text), widget (QLabel, label) #: rc.cpp:33 rc.cpp:114 msgid "Icon SIze:" msgstr "Ikonstorlek:" #. i18n: file: quickaccessConfig.ui:210 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:36 rc.cpp:117 msgid "16" msgstr "16" #. i18n: file: quickaccessConfig.ui:215 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:39 rc.cpp:120 msgid "22" msgstr "22" #. i18n: file: quickaccessConfig.ui:220 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:42 rc.cpp:123 msgid "32" msgstr "32" #. i18n: file: quickaccessConfig.ui:225 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:45 rc.cpp:126 msgid "48" msgstr "48" #. i18n: file: quickaccessConfig.ui:230 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:48 rc.cpp:129 msgid "64" msgstr "64" #. i18n: file: quickaccessConfig.ui:235 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:51 rc.cpp:132 msgid "128" msgstr "128" #. i18n: file: quickaccessConfig.ui:249 #. i18n: ectx: property (text), widget (QLabel, label_3) #: rc.cpp:54 rc.cpp:135 msgid "View mode:" msgstr "Visningsläge:" #. i18n: file: quickaccessConfig.ui:260 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:57 rc.cpp:138 msgid "List mode" msgstr "Listläge" #. i18n: file: quickaccessConfig.ui:265 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:60 rc.cpp:141 msgid "Icon mode" msgstr "Ikonläge" #. i18n: file: quickaccessConfig.ui:275 #. i18n: ectx: property (text), widget (QCheckBox, tooltipBox) #: rc.cpp:63 rc.cpp:144 msgid "Show tooltips" msgstr "Visa verktygstips" #. i18n: file: quickaccessConfig.ui:282 #. i18n: ectx: property (text), widget (QCheckBox, customLabelBox) #: rc.cpp:66 rc.cpp:147 msgid "Use a custom Label" msgstr "Använd en egen etikett" #. i18n: file: quickaccessConfig.ui:307 #. i18n: ectx: property (text), widget (QLabel, customLabel) #: rc.cpp:69 rc.cpp:150 msgid "Label:" msgstr "Etikett:" #. i18n: file: quickaccessConfig.ui:357 #. i18n: ectx: attribute (title), widget (QWidget, preview) #: rc.cpp:72 rc.cpp:153 msgid "Preview" msgstr "Förhandsvisa" #. i18n: file: quickaccessConfig.ui:363 #. i18n: ectx: property (text), widget (QCheckBox, previewBox) #: rc.cpp:75 rc.cpp:156 msgid "Show Previews" msgstr "Visa förhandsvisning" #. i18n: file: quickaccessConfig.ui:377 #. i18n: ectx: property (text), widget (QLabel, previewLabel1) #: rc.cpp:78 rc.cpp:159 msgid "Preview plugins:" msgstr "Insticksmoduler för förhandsvisning:" #. i18n: file: quickaccessConfig.ui:386 #. i18n: ectx: property (text), widget (QLabel, previewLabel2) #: rc.cpp:81 rc.cpp:162 msgid "Here you can enable/disable the plugins." msgstr "Här kan du aktivera/inaktivera insticksmodulerna." plasma-widget-quickaccess-0.8.1/po/sv/CMakeLists.txt000644 001750 001750 00000000163 11207307040 020552 0ustar00000000 000000 file(GLOB _po_files *.po) GETTEXT_PROCESS_PO_FILES(sv ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) plasma-widget-quickaccess-0.8.1/po/tr/000755 001750 001750 00000000000 11207307040 016007 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/po/tr/plasma_applet_quickaccess.po000644 001750 001750 00000012743 11207307040 023556 0ustar00000000 000000 # Turkish translation for plasma-widget-quickaccess # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the plasma-widget-quickaccess package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: plasma-widget-quickaccess\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-04-12 03:44+0000\n" "PO-Revision-Date: 2009-04-19 00:17+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Turkish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-04-20 20:00+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: label.cpp:44 msgid "Open" msgstr "" #: popupdialog.cpp:87 msgid "Sort by name" msgstr "" #: popupdialog.cpp:90 msgid "Sort by size" msgstr "" #: popupdialog.cpp:93 msgid "Sort by last modified" msgstr "" #: quickaccess.cpp:207 msgid "" "Sorry, but the \"applications:\" KIO slave is not supported, because it will " "crash QuickAccess/Plasma..." msgstr "" #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #: rc.cpp:3 rc.cpp:6 rc.cpp:84 rc.cpp:87 msgid "Form" msgstr "" #. i18n: file: quickaccessConfig.ui:28 #. i18n: ectx: attribute (title), widget (QWidget, general) #: rc.cpp:9 rc.cpp:90 msgid "General" msgstr "" #. i18n: file: quickaccessConfig.ui:39 #. i18n: ectx: property (text), widget (QLabel, selectLabel) #: rc.cpp:12 rc.cpp:93 msgid "Directory:" msgstr "" #. i18n: file: quickaccessConfig.ui:62 #. i18n: ectx: property (text), widget (QLabel, filterLabel) #: rc.cpp:15 rc.cpp:96 msgid "Filters:" msgstr "" #. i18n: file: quickaccessConfig.ui:104 #. i18n: ectx: property (text), widget (QCheckBox, hiddenBox) #: rc.cpp:18 rc.cpp:99 msgid "Show hidden files" msgstr "" #. i18n: file: quickaccessConfig.ui:111 #. i18n: ectx: property (text), widget (QCheckBox, onlyDirsBox) #: rc.cpp:21 rc.cpp:102 msgid "Show only folders" msgstr "" #. i18n: file: quickaccessConfig.ui:118 #. i18n: ectx: property (text), widget (QCheckBox, navigationBox) #: rc.cpp:24 rc.cpp:105 msgid "Allow navigation" msgstr "" #. i18n: file: quickaccessConfig.ui:147 #. i18n: ectx: attribute (title), widget (QWidget, appearance) #: rc.cpp:27 rc.cpp:108 msgid "Appearance" msgstr "" #. i18n: file: quickaccessConfig.ui:170 #. i18n: ectx: property (text), widget (QLabel, label_2) #: rc.cpp:30 rc.cpp:111 msgid "Custom icon:" msgstr "" #. i18n: file: quickaccessConfig.ui:199 #. i18n: ectx: property (text), widget (QLabel, label) #: rc.cpp:33 rc.cpp:114 msgid "Icon SIze:" msgstr "" #. i18n: file: quickaccessConfig.ui:210 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:36 rc.cpp:117 msgid "16" msgstr "" #. i18n: file: quickaccessConfig.ui:215 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:39 rc.cpp:120 msgid "22" msgstr "" #. i18n: file: quickaccessConfig.ui:220 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:42 rc.cpp:123 msgid "32" msgstr "" #. i18n: file: quickaccessConfig.ui:225 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:45 rc.cpp:126 msgid "48" msgstr "" #. i18n: file: quickaccessConfig.ui:230 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:48 rc.cpp:129 msgid "64" msgstr "" #. i18n: file: quickaccessConfig.ui:235 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:51 rc.cpp:132 msgid "128" msgstr "" #. i18n: file: quickaccessConfig.ui:249 #. i18n: ectx: property (text), widget (QLabel, label_3) #: rc.cpp:54 rc.cpp:135 msgid "View mode:" msgstr "" #. i18n: file: quickaccessConfig.ui:260 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:57 rc.cpp:138 msgid "List mode" msgstr "" #. i18n: file: quickaccessConfig.ui:265 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:60 rc.cpp:141 msgid "Icon mode" msgstr "" #. i18n: file: quickaccessConfig.ui:275 #. i18n: ectx: property (text), widget (QCheckBox, tooltipBox) #: rc.cpp:63 rc.cpp:144 msgid "Show tooltips" msgstr "" #. i18n: file: quickaccessConfig.ui:282 #. i18n: ectx: property (text), widget (QCheckBox, customLabelBox) #: rc.cpp:66 rc.cpp:147 msgid "Use a custom Label" msgstr "" #. i18n: file: quickaccessConfig.ui:307 #. i18n: ectx: property (text), widget (QLabel, customLabel) #: rc.cpp:69 rc.cpp:150 msgid "Label:" msgstr "" #. i18n: file: quickaccessConfig.ui:357 #. i18n: ectx: attribute (title), widget (QWidget, preview) #: rc.cpp:72 rc.cpp:153 msgid "Preview" msgstr "" #. i18n: file: quickaccessConfig.ui:363 #. i18n: ectx: property (text), widget (QCheckBox, previewBox) #: rc.cpp:75 rc.cpp:156 msgid "Show Previews" msgstr "" #. i18n: file: quickaccessConfig.ui:377 #. i18n: ectx: property (text), widget (QLabel, previewLabel1) #: rc.cpp:78 rc.cpp:159 msgid "Preview plugins:" msgstr "" #. i18n: file: quickaccessConfig.ui:386 #. i18n: ectx: property (text), widget (QLabel, previewLabel2) #: rc.cpp:81 rc.cpp:162 msgid "Here you can enable/disable the plugins." msgstr "" plasma-widget-quickaccess-0.8.1/po/tr/CMakeLists.txt000644 001750 001750 00000000163 11207307040 020547 0ustar00000000 000000 file(GLOB _po_files *.po) GETTEXT_PROCESS_PO_FILES(tr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) plasma-widget-quickaccess-0.8.1/po/fr/000755 001750 001750 00000000000 11207307040 015771 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/po/fr/plasma_applet_quickaccess.po000644 001750 001750 00000014107 11207307040 023534 0ustar00000000 000000 # French translation for plasma-widget-quickaccess # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the plasma-widget-quickaccess package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: plasma-widget-quickaccess\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-04-12 03:44+0000\n" "PO-Revision-Date: 2009-04-09 05:40+0000\n" "Last-Translator: Bruno Patri \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-04-20 20:00+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: label.cpp:44 msgid "Open" msgstr "Ouvrir" #: popupdialog.cpp:87 msgid "Sort by name" msgstr "Trier par nom" #: popupdialog.cpp:90 msgid "Sort by size" msgstr "Trier par taille" #: popupdialog.cpp:93 msgid "Sort by last modified" msgstr "Trie par date de dernière modification" #: quickaccess.cpp:207 msgid "" "Sorry, but the \"applications:\" KIO slave is not supported, because it will " "crash QuickAccess/Plasma..." msgstr "" "Désolé mais le module KIO « applications: » n'est pas pris en charge, car il " "provoquerait un plantage de Plasma/QuickAccess" #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #: rc.cpp:3 rc.cpp:6 rc.cpp:84 rc.cpp:87 msgid "Form" msgstr "Form" #. i18n: file: quickaccessConfig.ui:28 #. i18n: ectx: attribute (title), widget (QWidget, general) #: rc.cpp:9 rc.cpp:90 msgid "General" msgstr "Général" #. i18n: file: quickaccessConfig.ui:39 #. i18n: ectx: property (text), widget (QLabel, selectLabel) #: rc.cpp:12 rc.cpp:93 msgid "Directory:" msgstr "Dossier :" #. i18n: file: quickaccessConfig.ui:62 #. i18n: ectx: property (text), widget (QLabel, filterLabel) #: rc.cpp:15 rc.cpp:96 msgid "Filters:" msgstr "Filtres :" #. i18n: file: quickaccessConfig.ui:104 #. i18n: ectx: property (text), widget (QCheckBox, hiddenBox) #: rc.cpp:18 rc.cpp:99 msgid "Show hidden files" msgstr "Afficher les fichiers cachés" #. i18n: file: quickaccessConfig.ui:111 #. i18n: ectx: property (text), widget (QCheckBox, onlyDirsBox) #: rc.cpp:21 rc.cpp:102 msgid "Show only folders" msgstr "Afficher uniquement les dossiers" #. i18n: file: quickaccessConfig.ui:118 #. i18n: ectx: property (text), widget (QCheckBox, navigationBox) #: rc.cpp:24 rc.cpp:105 msgid "Allow navigation" msgstr "Permettre la navigation" #. i18n: file: quickaccessConfig.ui:147 #. i18n: ectx: attribute (title), widget (QWidget, appearance) #: rc.cpp:27 rc.cpp:108 msgid "Appearance" msgstr "Apparence" #. i18n: file: quickaccessConfig.ui:170 #. i18n: ectx: property (text), widget (QLabel, label_2) #: rc.cpp:30 rc.cpp:111 msgid "Custom icon:" msgstr "Icône personnalisée :" #. i18n: file: quickaccessConfig.ui:199 #. i18n: ectx: property (text), widget (QLabel, label) #: rc.cpp:33 rc.cpp:114 msgid "Icon SIze:" msgstr "Taille de l'icône" #. i18n: file: quickaccessConfig.ui:210 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:36 rc.cpp:117 msgid "16" msgstr "16" #. i18n: file: quickaccessConfig.ui:215 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:39 rc.cpp:120 msgid "22" msgstr "22" #. i18n: file: quickaccessConfig.ui:220 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:42 rc.cpp:123 msgid "32" msgstr "32" #. i18n: file: quickaccessConfig.ui:225 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:45 rc.cpp:126 msgid "48" msgstr "48" #. i18n: file: quickaccessConfig.ui:230 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:48 rc.cpp:129 msgid "64" msgstr "64" #. i18n: file: quickaccessConfig.ui:235 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:51 rc.cpp:132 msgid "128" msgstr "128" #. i18n: file: quickaccessConfig.ui:249 #. i18n: ectx: property (text), widget (QLabel, label_3) #: rc.cpp:54 rc.cpp:135 msgid "View mode:" msgstr "Type d'affichage :" #. i18n: file: quickaccessConfig.ui:260 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:57 rc.cpp:138 msgid "List mode" msgstr "Mode liste" #. i18n: file: quickaccessConfig.ui:265 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:60 rc.cpp:141 msgid "Icon mode" msgstr "Mode icônes" #. i18n: file: quickaccessConfig.ui:275 #. i18n: ectx: property (text), widget (QCheckBox, tooltipBox) #: rc.cpp:63 rc.cpp:144 msgid "Show tooltips" msgstr "Afficher les infobulles" #. i18n: file: quickaccessConfig.ui:282 #. i18n: ectx: property (text), widget (QCheckBox, customLabelBox) #: rc.cpp:66 rc.cpp:147 msgid "Use a custom Label" msgstr "Utiliser un libellé personnalisé" #. i18n: file: quickaccessConfig.ui:307 #. i18n: ectx: property (text), widget (QLabel, customLabel) #: rc.cpp:69 rc.cpp:150 msgid "Label:" msgstr "Libellé :" #. i18n: file: quickaccessConfig.ui:357 #. i18n: ectx: attribute (title), widget (QWidget, preview) #: rc.cpp:72 rc.cpp:153 msgid "Preview" msgstr "Aperçu" #. i18n: file: quickaccessConfig.ui:363 #. i18n: ectx: property (text), widget (QCheckBox, previewBox) #: rc.cpp:75 rc.cpp:156 msgid "Show Previews" msgstr "Afficher les aperçus" #. i18n: file: quickaccessConfig.ui:377 #. i18n: ectx: property (text), widget (QLabel, previewLabel1) #: rc.cpp:78 rc.cpp:159 msgid "Preview plugins:" msgstr "Modules d'aperçu :" #. i18n: file: quickaccessConfig.ui:386 #. i18n: ectx: property (text), widget (QLabel, previewLabel2) #: rc.cpp:81 rc.cpp:162 msgid "Here you can enable/disable the plugins." msgstr "Vous pouvez activer/désactiver les modules externes ici." plasma-widget-quickaccess-0.8.1/po/fr/CMakeLists.txt000644 001750 001750 00000000163 11207307040 020531 0ustar00000000 000000 file(GLOB _po_files *.po) GETTEXT_PROCESS_PO_FILES(fr ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) plasma-widget-quickaccess-0.8.1/po/es/000755 001750 001750 00000000000 11207307040 015771 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/po/es/plasma_applet_quickaccess.po000644 001750 001750 00000014000 11207307040 023524 0ustar00000000 000000 # Spanish translation for plasma-widget-quickaccess # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the plasma-widget-quickaccess package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: plasma-widget-quickaccess\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-04-12 03:44+0000\n" "PO-Revision-Date: 2009-04-11 16:41+0000\n" "Last-Translator: Paco Molinero \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-04-20 20:00+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: label.cpp:44 msgid "Open" msgstr "Abrir" #: popupdialog.cpp:87 msgid "Sort by name" msgstr "Ordenar por nombre" #: popupdialog.cpp:90 msgid "Sort by size" msgstr "Ordenar por tamaño" #: popupdialog.cpp:93 msgid "Sort by last modified" msgstr "Ordenar por última modificación" #: quickaccess.cpp:207 msgid "" "Sorry, but the \"applications:\" KIO slave is not supported, because it will " "crash QuickAccess/Plasma..." msgstr "" "Lo sentimos pero las «aplicaciones» KIO slave no están soportadas porque " "rompen QuickAccess/Plasma..." #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #: rc.cpp:3 rc.cpp:6 rc.cpp:84 rc.cpp:87 msgid "Form" msgstr "Formulario" #. i18n: file: quickaccessConfig.ui:28 #. i18n: ectx: attribute (title), widget (QWidget, general) #: rc.cpp:9 rc.cpp:90 msgid "General" msgstr "General" #. i18n: file: quickaccessConfig.ui:39 #. i18n: ectx: property (text), widget (QLabel, selectLabel) #: rc.cpp:12 rc.cpp:93 msgid "Directory:" msgstr "Directorio:" #. i18n: file: quickaccessConfig.ui:62 #. i18n: ectx: property (text), widget (QLabel, filterLabel) #: rc.cpp:15 rc.cpp:96 msgid "Filters:" msgstr "Filtros:" #. i18n: file: quickaccessConfig.ui:104 #. i18n: ectx: property (text), widget (QCheckBox, hiddenBox) #: rc.cpp:18 rc.cpp:99 msgid "Show hidden files" msgstr "Mostrar archivos ocultos" #. i18n: file: quickaccessConfig.ui:111 #. i18n: ectx: property (text), widget (QCheckBox, onlyDirsBox) #: rc.cpp:21 rc.cpp:102 msgid "Show only folders" msgstr "Sólo mostrar carpetas" #. i18n: file: quickaccessConfig.ui:118 #. i18n: ectx: property (text), widget (QCheckBox, navigationBox) #: rc.cpp:24 rc.cpp:105 msgid "Allow navigation" msgstr "Permitir navegación" #. i18n: file: quickaccessConfig.ui:147 #. i18n: ectx: attribute (title), widget (QWidget, appearance) #: rc.cpp:27 rc.cpp:108 msgid "Appearance" msgstr "Apariencia" #. i18n: file: quickaccessConfig.ui:170 #. i18n: ectx: property (text), widget (QLabel, label_2) #: rc.cpp:30 rc.cpp:111 msgid "Custom icon:" msgstr "Icono personalizado:" #. i18n: file: quickaccessConfig.ui:199 #. i18n: ectx: property (text), widget (QLabel, label) #: rc.cpp:33 rc.cpp:114 msgid "Icon SIze:" msgstr "Tamaño de icono:" #. i18n: file: quickaccessConfig.ui:210 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:36 rc.cpp:117 msgid "16" msgstr "16" #. i18n: file: quickaccessConfig.ui:215 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:39 rc.cpp:120 msgid "22" msgstr "22" #. i18n: file: quickaccessConfig.ui:220 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:42 rc.cpp:123 msgid "32" msgstr "32" #. i18n: file: quickaccessConfig.ui:225 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:45 rc.cpp:126 msgid "48" msgstr "48" #. i18n: file: quickaccessConfig.ui:230 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:48 rc.cpp:129 msgid "64" msgstr "64" #. i18n: file: quickaccessConfig.ui:235 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:51 rc.cpp:132 msgid "128" msgstr "128" #. i18n: file: quickaccessConfig.ui:249 #. i18n: ectx: property (text), widget (QLabel, label_3) #: rc.cpp:54 rc.cpp:135 msgid "View mode:" msgstr "Modo de visualización" #. i18n: file: quickaccessConfig.ui:260 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:57 rc.cpp:138 msgid "List mode" msgstr "Modo lista" #. i18n: file: quickaccessConfig.ui:265 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:60 rc.cpp:141 msgid "Icon mode" msgstr "Modo icono" #. i18n: file: quickaccessConfig.ui:275 #. i18n: ectx: property (text), widget (QCheckBox, tooltipBox) #: rc.cpp:63 rc.cpp:144 msgid "Show tooltips" msgstr "Mostrar consejos" #. i18n: file: quickaccessConfig.ui:282 #. i18n: ectx: property (text), widget (QCheckBox, customLabelBox) #: rc.cpp:66 rc.cpp:147 msgid "Use a custom Label" msgstr "Usar una etiqueta personalizada" #. i18n: file: quickaccessConfig.ui:307 #. i18n: ectx: property (text), widget (QLabel, customLabel) #: rc.cpp:69 rc.cpp:150 msgid "Label:" msgstr "Etiqueta:" #. i18n: file: quickaccessConfig.ui:357 #. i18n: ectx: attribute (title), widget (QWidget, preview) #: rc.cpp:72 rc.cpp:153 msgid "Preview" msgstr "Vista previa" #. i18n: file: quickaccessConfig.ui:363 #. i18n: ectx: property (text), widget (QCheckBox, previewBox) #: rc.cpp:75 rc.cpp:156 msgid "Show Previews" msgstr "Mostrar vistas previas" #. i18n: file: quickaccessConfig.ui:377 #. i18n: ectx: property (text), widget (QLabel, previewLabel1) #: rc.cpp:78 rc.cpp:159 msgid "Preview plugins:" msgstr "Ver complementos:" #. i18n: file: quickaccessConfig.ui:386 #. i18n: ectx: property (text), widget (QLabel, previewLabel2) #: rc.cpp:81 rc.cpp:162 msgid "Here you can enable/disable the plugins." msgstr "Aquí activa/desactiva los complementos." plasma-widget-quickaccess-0.8.1/po/es/CMakeLists.txt000644 001750 001750 00000000163 11207307040 020531 0ustar00000000 000000 file(GLOB _po_files *.po) GETTEXT_PROCESS_PO_FILES(es ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) plasma-widget-quickaccess-0.8.1/po/gl/000755 001750 001750 00000000000 11207307040 015764 5ustar00000000 000000 plasma-widget-quickaccess-0.8.1/po/gl/plasma_applet_quickaccess.po000644 001750 001750 00000014001 11207307040 023520 0ustar00000000 000000 # Galician translation for plasma-widget-quickaccess # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009 # This file is distributed under the same license as the plasma-widget-quickaccess package. # FIRST AUTHOR , 2009. # msgid "" msgstr "" "Project-Id-Version: plasma-widget-quickaccess\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2009-04-12 03:44+0000\n" "PO-Revision-Date: 2009-04-19 09:02+0000\n" "Last-Translator: Manuel A. Vázquez Diz \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2009-04-20 20:00+0000\n" "X-Generator: Launchpad (build Unknown)\n" #: label.cpp:44 msgid "Open" msgstr "Abrir" #: popupdialog.cpp:87 msgid "Sort by name" msgstr "Ordenar por nome" #: popupdialog.cpp:90 msgid "Sort by size" msgstr "Ordenar por tamaño" #: popupdialog.cpp:93 msgid "Sort by last modified" msgstr "Ordenar por última modificación" #: quickaccess.cpp:207 msgid "" "Sorry, but the \"applications:\" KIO slave is not supported, because it will " "crash QuickAccess/Plasma..." msgstr "" "Sentímolo pero as «aplicacións» KIO slave non están soportadas porque rachan " "QuickAccess/Plasma..." #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #. i18n: file: pluginwidgetbase.ui:13 #. i18n: ectx: property (windowTitle), widget (QWidget, PluginWidgetBase) #. i18n: file: quickaccessConfig.ui:13 #. i18n: ectx: property (windowTitle), widget (KTabWidget, QuickAccessConfig) #: rc.cpp:3 rc.cpp:6 rc.cpp:84 rc.cpp:87 msgid "Form" msgstr "Formulario" #. i18n: file: quickaccessConfig.ui:28 #. i18n: ectx: attribute (title), widget (QWidget, general) #: rc.cpp:9 rc.cpp:90 msgid "General" msgstr "Xeral" #. i18n: file: quickaccessConfig.ui:39 #. i18n: ectx: property (text), widget (QLabel, selectLabel) #: rc.cpp:12 rc.cpp:93 msgid "Directory:" msgstr "Directorio:" #. i18n: file: quickaccessConfig.ui:62 #. i18n: ectx: property (text), widget (QLabel, filterLabel) #: rc.cpp:15 rc.cpp:96 msgid "Filters:" msgstr "Filtros:" #. i18n: file: quickaccessConfig.ui:104 #. i18n: ectx: property (text), widget (QCheckBox, hiddenBox) #: rc.cpp:18 rc.cpp:99 msgid "Show hidden files" msgstr "Mostrar os ficheiros acochados" #. i18n: file: quickaccessConfig.ui:111 #. i18n: ectx: property (text), widget (QCheckBox, onlyDirsBox) #: rc.cpp:21 rc.cpp:102 msgid "Show only folders" msgstr "Mostrar só cartafoles" #. i18n: file: quickaccessConfig.ui:118 #. i18n: ectx: property (text), widget (QCheckBox, navigationBox) #: rc.cpp:24 rc.cpp:105 msgid "Allow navigation" msgstr "Permitir navegación" #. i18n: file: quickaccessConfig.ui:147 #. i18n: ectx: attribute (title), widget (QWidget, appearance) #: rc.cpp:27 rc.cpp:108 msgid "Appearance" msgstr "Aparencia" #. i18n: file: quickaccessConfig.ui:170 #. i18n: ectx: property (text), widget (QLabel, label_2) #: rc.cpp:30 rc.cpp:111 msgid "Custom icon:" msgstr "Icona personalizada:" #. i18n: file: quickaccessConfig.ui:199 #. i18n: ectx: property (text), widget (QLabel, label) #: rc.cpp:33 rc.cpp:114 msgid "Icon SIze:" msgstr "Tamaño de icona:" #. i18n: file: quickaccessConfig.ui:210 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:36 rc.cpp:117 msgid "16" msgstr "16" #. i18n: file: quickaccessConfig.ui:215 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:39 rc.cpp:120 msgid "22" msgstr "22" #. i18n: file: quickaccessConfig.ui:220 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:42 rc.cpp:123 msgid "32" msgstr "32" #. i18n: file: quickaccessConfig.ui:225 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:45 rc.cpp:126 msgid "48" msgstr "48" #. i18n: file: quickaccessConfig.ui:230 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:48 rc.cpp:129 msgid "64" msgstr "64" #. i18n: file: quickaccessConfig.ui:235 #. i18n: ectx: property (text), item, widget (QComboBox, iconSizeCombo) #: rc.cpp:51 rc.cpp:132 msgid "128" msgstr "128" #. i18n: file: quickaccessConfig.ui:249 #. i18n: ectx: property (text), widget (QLabel, label_3) #: rc.cpp:54 rc.cpp:135 msgid "View mode:" msgstr "Modo da vista:" #. i18n: file: quickaccessConfig.ui:260 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:57 rc.cpp:138 msgid "List mode" msgstr "Modo lista" #. i18n: file: quickaccessConfig.ui:265 #. i18n: ectx: property (text), item, widget (QComboBox, viewModeCombo) #: rc.cpp:60 rc.cpp:141 msgid "Icon mode" msgstr "Modo icona" #. i18n: file: quickaccessConfig.ui:275 #. i18n: ectx: property (text), widget (QCheckBox, tooltipBox) #: rc.cpp:63 rc.cpp:144 msgid "Show tooltips" msgstr "Mostrar consellos" #. i18n: file: quickaccessConfig.ui:282 #. i18n: ectx: property (text), widget (QCheckBox, customLabelBox) #: rc.cpp:66 rc.cpp:147 msgid "Use a custom Label" msgstr "Usar unha etiqueta personalizada" #. i18n: file: quickaccessConfig.ui:307 #. i18n: ectx: property (text), widget (QLabel, customLabel) #: rc.cpp:69 rc.cpp:150 msgid "Label:" msgstr "Etiqueta:" #. i18n: file: quickaccessConfig.ui:357 #. i18n: ectx: attribute (title), widget (QWidget, preview) #: rc.cpp:72 rc.cpp:153 msgid "Preview" msgstr "Previsualización" #. i18n: file: quickaccessConfig.ui:363 #. i18n: ectx: property (text), widget (QCheckBox, previewBox) #: rc.cpp:75 rc.cpp:156 msgid "Show Previews" msgstr "Mostrar vistas previas" #. i18n: file: quickaccessConfig.ui:377 #. i18n: ectx: property (text), widget (QLabel, previewLabel1) #: rc.cpp:78 rc.cpp:159 msgid "Preview plugins:" msgstr "Ver plugins:" #. i18n: file: quickaccessConfig.ui:386 #. i18n: ectx: property (text), widget (QLabel, previewLabel2) #: rc.cpp:81 rc.cpp:162 msgid "Here you can enable/disable the plugins." msgstr "Aquí activa/desactiva os plugins." plasma-widget-quickaccess-0.8.1/po/gl/CMakeLists.txt000644 001750 001750 00000000163 11207307040 020524 0ustar00000000 000000 file(GLOB _po_files *.po) GETTEXT_PROCESS_PO_FILES(gl ALL INSTALL_DESTINATION ${LOCALE_INSTALL_DIR} ${_po_files} ) plasma-widget-quickaccess-0.8.1/po/CMakeLists.txt000644 001750 001750 00000000672 11207307040 020127 0ustar00000000 000000 find_package(Gettext REQUIRED) if (NOT GETTEXT_MSGMERGE_EXECUTABLE) MESSAGE(FATAL_ERROR "Please install msgmerge binary") endif (NOT GETTEXT_MSGMERGE_EXECUTABLE) if (NOT GETTEXT_MSGFMT_EXECUTABLE) MESSAGE(FATAL_ERROR "Please install msgmerge binary") endif (NOT GETTEXT_MSGFMT_EXECUTABLE) add_subdirectory(es) add_subdirectory(fr) add_subdirectory(gl) add_subdirectory(pt_BR) add_subdirectory(sv) add_subdirectory(tr) add_subdirectory(zh_CN) plasma-widget-quickaccess-0.8.1/button.h000644 001750 001750 00000003144 11207307040 016432 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef Button_HEADER #define Button_HEADER #include #include class ButtonPrivate; class Button : public QToolButton { Q_OBJECT public: Button(QWidget *parent = 0); ~Button(); }; #endif //Button_HEADER plasma-widget-quickaccess-0.8.1/quickaccessGeneralConfig.ui000644 001750 001750 00000010744 11207307040 022233 0ustar00000000 000000 quickaccessGeneralConfig 0 0 400 232 Form Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter Directory: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter urlRequester 1 0 Filters: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter filterEdit 0 0 Qt::Horizontal 40 20 Show hidden files Show only folders Allow navigation true Use Dolphin's directory sorting setting true Navigate with single click true Qt::Vertical 20 16 KLineEdit QLineEdit
klineedit.h
KUrlRequester QFrame
kurlrequester.h
1
plasma-widget-quickaccess-0.8.1/resizedialog.cpp000644 001750 001750 00000020564 11207307040 020140 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ //KDE //Qt #include #include //Plasma #include #include "resizedialog.h" class ResizeDialogPrivate { public: enum ResizeType { Left = 1, TopLeft = 2, Top = 3, TopRight = 4, Right = 5, BottomRight = 6, Bottom = 7, BottomLeft = 8, NoResize = 9 }; ResizeDialogPrivate(); ~ResizeDialogPrivate(); Qt::CursorShape cursorShape(const QPoint &); ResizeType resizeType(const QPoint &); void changeSize(); void setUpChildren(const QObjectList &objectList); ResizeDialog *q; ResizeType resize; int resizeTimerID; }; ResizeDialog::ResizeDialog(QWidget *parent, Qt::WindowFlags f) :Plasma::Dialog(parent, f) ,d(new ResizeDialogPrivate) { d->q = this; setMouseTracking(true); connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), SLOT(updateColors())); updateColors(); } ResizeDialog::~ResizeDialog() { delete d; } void ResizeDialog::updateColors() { QPalette pal = palette(); pal.setColor(QPalette::Text, Plasma::Theme::defaultTheme()->color( Plasma::Theme::TextColor )); pal.setColor(QPalette::WindowText, Plasma::Theme::defaultTheme()->color( Plasma::Theme::TextColor )); pal.setColor(QPalette::Base, Qt::transparent); pal.setColor(QPalette::Window, Qt::transparent); //pal.setColor(QPalette::Button, Qt::transparent); pal.setColor(QPalette::ButtonText, Plasma::Theme::defaultTheme()->color( Plasma::Theme::TextColor )); setPalette(pal); } bool ResizeDialog::eventFilter(QObject *object, QEvent *event) { if(d->resize != ResizeDialogPrivate::NoResize) { if(event->type() == QEvent::MouseButtonRelease || event->type() == QEvent::MouseMove || event->type() == QEvent::Enter) { QCoreApplication::sendEvent(this, event); return true; } } if( event->type() == QEvent::MouseMove ) { QCoreApplication::sendEvent(this, event); } return Plasma::Dialog::eventFilter(object, event); } void ResizeDialog::childEvent(QChildEvent *event) { d->setUpChildren(QObjectList() << event->child()); Plasma::Dialog::childEvent(event); } void ResizeDialog::hideEvent (QHideEvent *event) { d->resize = ResizeDialogPrivate::NoResize; Plasma::Dialog::hideEvent( event ); } void ResizeDialog::mouseMoveEvent(QMouseEvent *event) { if(d->resize == ResizeDialogPrivate::NoResize) { setCursor(d->cursorShape(event->pos())); } Plasma::Dialog::mouseMoveEvent(event); } void ResizeDialog::mousePressEvent(QMouseEvent *event) { d->resize = d->resizeType(event->pos()); if(d->resize != ResizeDialogPrivate::NoResize) { d->resizeTimerID = startTimer(100); } Dialog::mousePressEvent(event); } void ResizeDialog::mouseReleaseEvent(QMouseEvent *event) { if(d->resize != ResizeDialogPrivate::NoResize) { killTimer(d->resizeTimerID); d->changeSize(); d->resize = ResizeDialogPrivate::NoResize; } Dialog::mouseReleaseEvent(event); } void ResizeDialog::timerEvent(QTimerEvent *event) { if(event->timerId() == d->resizeTimerID) { d->changeSize(); } } ResizeDialogPrivate::ResizeDialogPrivate() :resize(NoResize) { } ResizeDialogPrivate::~ResizeDialogPrivate() { } Qt::CursorShape ResizeDialogPrivate::cursorShape(const QPoint &point) { ResizeType type = resizeType(point); switch (type) { case NoResize: return Qt::ArrowCursor; case Left: case Right: return Qt::SizeHorCursor; case Top: case Bottom: return Qt::SizeVerCursor; case TopLeft: case BottomRight: return Qt::SizeFDiagCursor; case TopRight: case BottomLeft: return Qt::SizeBDiagCursor; default: return Qt::ArrowCursor; } } ResizeDialogPrivate::ResizeType ResizeDialogPrivate::resizeType(const QPoint &point) { if(!q->rect().contains(point)) { return NoResize; } int top, left, right, bottom; q->getContentsMargins(&left, &top, &right, &bottom); QRect l(0, top, left, q->height() - top - bottom); if(l.contains(point)) { return Left; } QRect r(q->width() - right, top, right, q->height() - top - bottom); if(r.contains(point)) { return Right; } QRect t(left, 0, q->width() - left - right, top); if(t.contains(point)) { return Top; } QRect b(left, q->height() - bottom, q->width() - left - right, bottom ); if(b.contains(point)) { return Bottom; } QRect topleft(0, 0, left, top); if(topleft.contains(point)) { return TopLeft; } QRect bottomright(q->width() - right, q->height() - bottom, right, bottom); if(bottomright.contains(point)) { return BottomRight; } QRect topright(q->width() - right, 0, right, top); if(topright.contains(point)) { return TopRight; } QRect bottomleft(0, q->height() - bottom, left, bottom); if(bottomleft.contains(point)) { return BottomLeft; } return NoResize; } void ResizeDialogPrivate::changeSize() { QPoint cursorPosition = q->mapFromGlobal(QCursor::pos()); int newX = q->x(); int newY = q->y(); int newWidth = q->width(); int newHeight = q->height(); switch (resize) { case Left: newWidth = qMax( q->width() - cursorPosition.x(), q->minimumSizeHint().width() ); newX += + q->width() - newWidth; break; case Right: newWidth = qMax( cursorPosition.x(), q->minimumSizeHint().width() ); break; case Top: newHeight = qMax( q->height() - cursorPosition.y(), q->minimumSizeHint().height() ); newY += q->height() - newHeight; break; case Bottom: newHeight = qMax( cursorPosition.y(), q->minimumSizeHint().height() ); break; case TopLeft: newWidth = qMax( q->width() - cursorPosition.x(), q->minimumSizeHint().width() ); newHeight = qMax( q->height() - cursorPosition.y(), q->minimumSizeHint().height() ); newX += q->width() - newWidth; newY += q->height() - newHeight; break; case BottomRight: newWidth = qMax( cursorPosition.x(), q->minimumSizeHint().width() ); newHeight = qMax( cursorPosition.y(), q->minimumSizeHint().height() ); break; case TopRight: newWidth = qMax( cursorPosition.x(), q->minimumSizeHint().width() ); newHeight = qMax( q->height() - cursorPosition.y(), q->minimumSizeHint().height() ); newY += q->height() - newHeight; break; case BottomLeft: newWidth = qMax( q->width() - cursorPosition.x(), q->minimumSizeHint().width() ); newHeight = qMax( cursorPosition.y(), q->minimumSizeHint().height() ); newX += q->width() - newWidth; break; default: break; } q->setGeometry(newX, newY, newWidth, newHeight); } void ResizeDialogPrivate::setUpChildren(const QObjectList &objectList) { QObject *object; foreach(object, objectList) { if(object->isWidgetType()) { qobject_cast(object)->setMouseTracking(true); } object->installEventFilter(q); QObjectList list = object->children(); if(!list.isEmpty()) { setUpChildren(list); } } } #include "resizedialog.moc" plasma-widget-quickaccess-0.8.1/popupdialog.h000644 001750 001750 00000006112 11207307040 017440 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef PopupDialog_HEADER #define PopupDialog_HEADER #include #include //locale includes #include "dirmodel.h" #include "label.h" #include "iconmanager.h" #include "resizedialog.h" #include "settings.h" class KFileItemDelegate; class ItemView; class Button; class PopupDialog : public ResizeDialog { Q_OBJECT public: PopupDialog(Settings *settings, QWidget * parent = 0, Qt::WindowFlags f = Qt::Window); ~PopupDialog(); void setIconSize(int i); void setShowPreviews(bool show); void setShowHiddenFiles(bool show); void setShowOnlyDirs(bool show); void setFilter(const QString &filter); void setCustomLabel(const QString &label); void setShowOnlyIcons(bool onlyIcons); KFileItem startItem() { return m_start; } void checkDolphinSorting(const KUrl *dir); signals: void signal_hide(); public slots: void applySettings(Settings::SettingsType); void dirListerCompleted(); void setStartUrl(const KUrl &url); void slot_open(const QModelIndex &index); void open(); void updateColors(); protected: //reimplemented from QWidget virtual void hideEvent ( QHideEvent * event ); private slots: void sortButtonClicked(); void slot_sortingTriggered(); private: void updateSorting(); void toggleSingleClick(); private: Settings *m_settings; Label *m_label; Button *m_backButton; Button *m_sortButton; KFileItem m_start; KFileItem m_current; ItemView *m_view; DirModel *m_model; KDirSortFilterProxyModel *m_proxyModel; IconManager *m_iconManager; KFileItemDelegate *m_delegate; QMenu *m_sortMenu; QActionGroup *m_sortGroup; }; #endif plasma-widget-quickaccess-0.8.1/dirmodel.h000644 001750 001750 00000003257 11207307040 016723 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef DirModel_HEADER #define DirModel_HEADER //KDE includes #include class DirModel : public KDirModel { Q_OBJECT public: DirModel (QObject * parent = 0 ); virtual QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const; bool m_showOnlyIcons; private: }; #endif plasma-widget-quickaccess-0.8.1/itemview.cpp000644 001750 001750 00000060561 11207307040 017311 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include "itemview.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dirmodel.h" #include "effects.h" class ItemView::Private { public: Private(ItemView *view); ~Private(); void drawBackArrow(QPainter *painter, QStyle::State state) const; QRect backArrowRect() const; void updateScrollBarRange(); QPainterPath trianglePath(qreal width = 5, qreal height = 10) const; public: ItemView * const q; bool backArrowHover; int itemsPerRow; QPersistentModelIndex previousRootIndex; QPersistentModelIndex hoveredIndex; QPersistentModelIndex watchedIndexForEnter; ItemView::ViewMode viewMode; QSize gridSize; QTimeLine *animationTimeLine; QTimer *dragEnterTimer; qreal animationTime; bool showToolTips; bool goBack; QRect rubberBand; QPoint pressedPos; QTimeLine *scrollTimeLine; int scrollBarValue; int wheelScrollLines; private: }; ItemView::ItemView(QWidget *parent) :QAbstractItemView(parent) ,d(new Private(this)) { setMouseTracking(true); setAutoScroll(true); setDragDropMode(QAbstractItemView::DragDrop); setEditTriggers(QAbstractItemView::NoEditTriggers); setFrameShadow(QFrame::Plain); setSelectionMode(QAbstractItemView::ExtendedSelection); connect(d->animationTimeLine, SIGNAL(valueChanged(qreal)), this, SLOT(updateAnimation(qreal))); connect(d->animationTimeLine, SIGNAL(finished()), this, SLOT(timeLineFinished())); connect(d->dragEnterTimer , SIGNAL(timeout()), this, SLOT(dragEnter())); connect(d->scrollTimeLine, SIGNAL(valueChanged(qreal)), this, SLOT(updateScrollAnimation(qreal))); connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(scrollBarValueChanged(int))); connect(KGlobalSettings::self(), SIGNAL(settingsChanged(int)), this, SLOT(wheelScrollLinesChanged(int))); wheelScrollLinesChanged(KGlobalSettings::SETTINGS_MOUSE); } ItemView::~ItemView() { delete d; } void ItemView::setViewMode(ItemView::ViewMode mode) { if(d->viewMode != mode) { d->viewMode = mode; } } ItemView::ViewMode ItemView::viewMode() const { return d->viewMode; } void ItemView::setShowToolTips(bool show) { d->showToolTips = show; } bool ItemView::showToolTips() { return d->showToolTips; } QRect ItemView::visualRect(const QModelIndex &index) const { if(!index.isValid()) { return QRect(); } int topOffset = 0; int leftOffset = 0; int width = d->gridSize.width(); int backArrowWidth = d->backArrowRect().width() + BACK_ARROW_SPACING; if(model()->parent(index) != QModelIndex()) { if(viewMode() == ItemView::ListMode) { width -= backArrowWidth; } leftOffset += backArrowWidth; } topOffset -= verticalOffset(); leftOffset -= horizontalOffset(); int indexRow = index.row() / d->itemsPerRow; int indexColumn = index.row() % d->itemsPerRow; topOffset += indexRow * d->gridSize.height(); leftOffset += indexColumn * d->gridSize.width(); QRect itemRect(leftOffset, topOffset, width , d->gridSize.height()); return itemRect; } void ItemView::setIconSize(const QSize &size) { QAbstractItemView::setIconSize(size); } QModelIndex ItemView::indexAt(const QPoint& point) const { if(rootIndex() != QModelIndex() && d->backArrowRect().contains(point)){ return QModelIndex(); } int topOffset = 0 - verticalOffset(); int leftOffset = 0 - horizontalOffset(); if(rootIndex() != QModelIndex()) { leftOffset += BACK_ARROW_WIDTH; } int rowIndex = (point.y() - topOffset) / d->gridSize.height(); int columnIndex = (point.x() - leftOffset) / d->gridSize.width(); if(columnIndex >= d->itemsPerRow) return QModelIndex(); int row = rowIndex * d->itemsPerRow + columnIndex; if(row < model()->rowCount(rootIndex())) { return model()->index(row, 0, rootIndex()); } else { return QModelIndex(); } } void ItemView::scrollTo(const QModelIndex& index , ScrollHint hint) { if (!index.isValid()) { return; } QRect itemRect = visualRect(index); if (itemRect.isValid() && hint == EnsureVisible) { d->scrollBarValue = verticalScrollBar()->value(); if (itemRect.top() < 0) { d->scrollBarValue += itemRect.top(); } else if (itemRect.bottom() > viewport()->height()) { d->scrollBarValue += itemRect.bottom() - viewport()->height(); } if(d->scrollTimeLine->state() == QTimeLine::Running) { d->scrollTimeLine->stop(); } d->scrollTimeLine->setFrameRange(verticalScrollBar()->value(), d->scrollBarValue); d->scrollTimeLine->start(); } } int ItemView::horizontalOffset() const { return horizontalScrollBar()->value(); } int ItemView::verticalOffset() const { return verticalScrollBar()->value(); } QModelIndex ItemView::moveCursor(CursorAction cursorAction,Qt::KeyboardModifiers modifiers) { Q_UNUSED(modifiers); QModelIndex index = currentIndex(); switch (cursorAction) { case MoveUp: if (viewMode() == ItemView::IconMode) { index = model()->index(index.row() - d->itemsPerRow, 0, rootIndex()); } else { index = model()->index(index.row() - 1, 0, rootIndex()); } setCurrentIndex(index); break; case MoveDown: if (viewMode() == ItemView::IconMode) { index = model()->index(index.row() + d->itemsPerRow, 0, rootIndex()); } else { index = model()->index(index.row() + 1, 0, rootIndex()); } setCurrentIndex(index); break; case MoveLeft: if (viewMode() == ItemView::IconMode) { index = model()->index(index.row() - 1, 0, rootIndex()); setCurrentIndex(index); } break; case MoveRight: if (viewMode() == ItemView::IconMode) { index = model()->index(index.row() + 1, 0, rootIndex()); setCurrentIndex(index); } break; default: // Do nothing break; } // clear the hovered index update(d->hoveredIndex); d->hoveredIndex = index; return index; } void ItemView::setSelection(const QRect& rect , QItemSelectionModel::SelectionFlags flags) { QItemSelection selection; for(int i = 0; i < model()->rowCount(rootIndex()); i++) { if(!visualRect(model()->index(i, 0, rootIndex())).intersects(rect)) continue; int start = i; int end = i; while (i < model()->rowCount(rootIndex()) && visualRect(model()->index(i, 0, rootIndex())).intersects(rect)) { end = i++; } selection.select(model()->index(start, 0, rootIndex()), model()->index(end, 0, rootIndex())); } selectionModel()->select(selection,flags); } bool ItemView::isIndexHidden(const QModelIndex&) const { return false; } QRegion ItemView::visualRegionForSelection(const QItemSelection& selection) const { QRegion region; foreach(const QModelIndex& index , selection.indexes()) { region |= visualRect(index); } return region; } void ItemView::startDrag(Qt::DropActions supportedActions) { QDrag *drag = new QDrag(this); QMimeData *mimeData = model()->mimeData(selectionModel()->selectedIndexes()); if (!mimeData || mimeData->text().isNull()) { return; } drag->setMimeData(mimeData); QModelIndexList list = selectionModel()->selectedIndexes(); if(list.isEmpty()) { return; } QModelIndex idx = list.first(); QIcon icon = idx.data(Qt::DecorationRole).value(); drag->setPixmap(icon.pixmap(IconSize(KIconLoader::Desktop))); drag->exec(supportedActions); QAbstractItemView::startDrag(supportedActions); } void ItemView::dragMoveEvent(QDragMoveEvent *event) { if( event->pos().y() < autoScrollMargin() ) { QAbstractItemView::dragMoveEvent(event); if(verticalScrollBar()->value() != verticalScrollBar()->minimum()) { return;//avoid entering a folder while the itemview scrolls } } else if( viewport()->height() - event->pos().y() < autoScrollMargin() ){ QAbstractItemView::dragMoveEvent(event); if(verticalScrollBar()->value() != verticalScrollBar()->maximum()) { return;//avoid entering a folder while the itemview scrolls } } QModelIndex indexUnderMouse = indexAt(event->pos()); if(indexUnderMouse.isValid()) { d->goBack = false; if(model()->hasChildren(indexUnderMouse)) { QModelIndex index = d->hoveredIndex; d->hoveredIndex = indexUnderMouse; update(d->hoveredIndex); update(index); if(d->watchedIndexForEnter != indexUnderMouse) { d->watchedIndexForEnter = indexUnderMouse; d->dragEnterTimer->start(DRAG_ENTER_TIME); } } else { d->watchedIndexForEnter = QModelIndex(); } } else if (d->backArrowRect().contains(event->pos()) && rootIndex() != QModelIndex()) { d->watchedIndexForEnter = QModelIndex(); if(!d->goBack) { d->goBack = true; d->dragEnterTimer->start(DRAG_ENTER_TIME); } } else { d->watchedIndexForEnter = QModelIndex(); d->dragEnterTimer->stop(); d->goBack = false; } event->accept(); } void ItemView::dragEnterEvent(QDragEnterEvent *event) { event->setAccepted(event->mimeData()->hasUrls()); setState(QAbstractItemView::DraggingState); } void ItemView::scrollBarValueChanged(int value) { if(d->scrollTimeLine->state() != QTimeLine::Running) { d->scrollBarValue = value; } } void ItemView::wheelScrollLinesChanged(int category) { if(category != KGlobalSettings::SETTINGS_MOUSE) return; KConfig config("kdeglobals"); KConfigGroup group = config.group("KDE"); d->wheelScrollLines = group.readEntry("WheelScrollLines", 3); } void ItemView::dropEvent(QDropEvent *event) { d->dragEnterTimer->stop(); KDirSortFilterProxyModel *proxyModel = static_cast( model()); DirModel *model = static_cast(proxyModel->sourceModel()); KFileItem item = model->itemForIndex(proxyModel->mapToSource(rootIndex())); QDropEvent ev(mapToGlobal(event->pos()), event->dropAction(), event->mimeData(), event->mouseButtons(), event->keyboardModifiers()); KonqOperations::doDrop(item, item.url(), &ev, this); } bool ItemView::viewportEvent(QEvent *event) { if(event->type() == QEvent::ToolTip && d->showToolTips) { QHelpEvent *helpEvent = dynamic_cast(event); QModelIndex index = indexAt(helpEvent->pos()); if(!index.isValid() || index == rootIndex()) { return false; } KDirSortFilterProxyModel *proxyModel = dynamic_cast(model()); DirModel *model = dynamic_cast(proxyModel->sourceModel()); KFileItem item = model->itemForIndex(proxyModel->mapToSource(index)); QToolTip::showText(mapToGlobal(helpEvent->pos()), item.getToolTipText(), this, visualRect(index)); return true; } return QAbstractItemView::viewportEvent(event); } void ItemView::contextMenuEvent( QContextMenuEvent *event) { QModelIndex index = indexAt(mapFromParent(event->pos())); if(!index.isValid() || index == rootIndex()){ return; } QModelIndexList list = selectionModel()->selectedIndexes(); if(list.isEmpty()) { return; } KFileItemList items; foreach(const QModelIndex &i, list) { KFileItem selectedItem = i.data(KDirModel::FileItemRole).value(); if(!selectedItem.isNull()) { items.append(selectedItem); } } KParts::BrowserExtension::PopupFlags flags = KParts::BrowserExtension::ShowUrlOperations | KParts::BrowserExtension::ShowProperties; // Use the Dolphin setting for showing the "Copy To" and "Move To" actions KConfig dolphin("dolphinrc"); if (KConfigGroup(&dolphin, "General").readEntry("ShowCopyMoveMenu", false)) { flags |= KParts::BrowserExtension::ShowUrlOperations; } KActionCollection coll(this); KDirSortFilterProxyModel *proxyModel = dynamic_cast(model()); DirModel *model = dynamic_cast(proxyModel->sourceModel()); KFileItem item = model->itemForIndex(proxyModel->mapToSource(index)); KonqPopupMenu *contextMenu = new KonqPopupMenu(items, item.url() , coll, 0 , KonqPopupMenu::ShowNewWindow, flags, this, KBookmarkManager::userBookmarksManager()); if(contextMenu->exec(event->globalPos()) != 0){ qobject_cast(parent())->hide(); } delete contextMenu; } void ItemView::open(const QModelIndex &index) { const Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers(); if(modifier == Qt::ShiftModifier || modifier == Qt::ControlModifier) { return; } if (model()->canFetchMore(index)) { model()->fetchMore(index); } if(model()->hasChildren(index)) { d->previousRootIndex = rootIndex(); setRootIndex(index); setCurrentIndex(model()->index(0,0, index)); if(d->animationTimeLine->state() == QTimeLine::Running) { d->animationTimeLine->stop(); d->animationTimeLine->setDirection(QTimeLine::Backward); } d->animationTimeLine->start(); } selectionModel()->clearSelection(); emit signal_open(index); } void ItemView::updateAnimation(qreal value) { d->animationTime = value; viewport()->update(); } void ItemView::timeLineFinished() { d->animationTimeLine->toggleDirection(); if(d->animationTimeLine->direction() == QTimeLine::Forward) { d->animationTimeLine->start(); } } void ItemView::updateScrollAnimation(qreal value) { Q_UNUSED(value); verticalScrollBar()->setValue(d->scrollTimeLine->currentFrame()); } void ItemView::paintEvent(QPaintEvent *event) { relayout();//TODO put that in place where it is not called that often but often enough QPainter painter(viewport()); painter.setRenderHints(QPainter::Antialiasing); QStyle::State state = 0; if(d->backArrowHover) { state |= QStyle::State_MouseOver; } if(d->animationTimeLine->state() == QTimeLine::Running) { if(d->animationTimeLine->direction() == QTimeLine::Backward) { // Fade out painter.save(); painter.setOpacity(d->animationTime); paintItems(painter, event, d->previousRootIndex); painter.restore(); //draw backarrow painter.save(); if(rootIndex() == QModelIndex()){ painter.setOpacity(d->animationTime); d->drawBackArrow(&painter, state); } else if(d->previousRootIndex == QModelIndex()) { //do nothing } else { //don't fade d->drawBackArrow(&painter, state); } painter.restore(); } else { //QTimeLine::Forward Fade in painter.save(); painter.setOpacity(d->animationTime); paintItems(painter, event, rootIndex()); painter.restore(); //draw backarrow painter.save(); if(rootIndex() == QModelIndex()){ //do nothing } else if(d->previousRootIndex == QModelIndex()) { painter.setOpacity(d->animationTime); d->drawBackArrow(&painter, state); } else { //don't fade d->drawBackArrow(&painter, state); } painter.restore(); } } else { //NotRunning paintItems(painter, event, rootIndex()); //draw the rubberband if (d->rubberBand.isValid()) { QStyleOptionRubberBand opt; opt.rect = d->rubberBand; opt.shape = QRubberBand::Rectangle; opt.opaque = false; style()->drawControl(QStyle::CE_RubberBand, &opt, &painter); } //draw backarrow if(rootIndex() != QModelIndex()){ d->drawBackArrow(&painter, state); } } } void ItemView::paintItems(QPainter &painter, QPaintEvent *event, const QModelIndex &root) { painter.save(); const int rows = model()->rowCount(root); for (int i = 0; i < rows; ++i) { QModelIndex index = model()->index(i, 0, root); QStyleOptionViewItemV4 option = viewOptions(); option.decorationSize = iconSize(); option.displayAlignment = Qt::AlignHCenter; option.textElideMode = Qt::ElideRight; if(viewMode() == ItemView::ListMode) { option.displayAlignment = Qt::AlignLeft | Qt::AlignVCenter; option.decorationPosition = QStyleOptionViewItem::Left; } else { option.features = QStyleOptionViewItemV2::WrapText; option.displayAlignment = Qt::AlignCenter; option.decorationPosition = QStyleOptionViewItem::Top; } option.rect = visualRect(index); // only draw items intersecting the region of the widget // being updated if (!event->rect().intersects(option.rect)) { continue; } if (selectionModel()->isSelected(index)) { option.state |= QStyle::State_Selected; } if (index == d->hoveredIndex) { option.state |= QStyle::State_MouseOver; } if (index == currentIndex()) { option.state |= QStyle::State_HasFocus; } itemDelegate(index)->paint(&painter,option,index); } painter.restore(); } void ItemView::relayout() { if(viewMode() == ItemView::IconMode) { d->gridSize.setWidth(qMax(iconSize().width() + 10, fontMetrics().width("wwwwwwwwwww"))); d->gridSize.setHeight(iconSize().height() + 10 + fontMetrics().height()*2); } else { // ItemView::ListMode d->gridSize.setWidth(viewport()->width()); d->gridSize.setHeight(qMax(iconSize().height(), fontMetrics().height())); } d->itemsPerRow = viewport()->width() / d->gridSize.width(); if(d->itemsPerRow == 0) d->itemsPerRow = 1; //force one column d->updateScrollBarRange(); } void ItemView::dragEnter() { if(state() != QAbstractItemView::DraggingState) { d->goBack = false; d->watchedIndexForEnter = QModelIndex(); return; } QPoint pos = mapFromGlobal(QCursor::pos()); if(d->goBack) { if(d->backArrowRect().contains(pos)) { open(rootIndex().parent()); } } else if(d->watchedIndexForEnter == indexAt(pos)) { open(d->watchedIndexForEnter); } d->watchedIndexForEnter = QModelIndex(); d->goBack = false; } void ItemView::resizeEvent(QResizeEvent *event) { viewport()->update(); QAbstractItemView::resizeEvent(event); } void ItemView::mouseMoveEvent(QMouseEvent *event) { if(event->buttons() &= Qt::LeftButton && state() == QAbstractItemView::DragSelectingState) { d->rubberBand = QRect(d->pressedPos, event->pos()).normalized(); setSelection(d->rubberBand, QItemSelectionModel::ClearAndSelect); viewport()->update(); QAbstractItemView::mouseMoveEvent(event); return; } bool mouseOverBackArrow = d->backArrowRect().contains(event->pos()); if (mouseOverBackArrow != d->backArrowHover) { d->backArrowHover = mouseOverBackArrow; setDirtyRegion(d->backArrowRect()); } QModelIndex index = indexAt(event->pos()); d->hoveredIndex = index; update(index); QAbstractItemView::mouseMoveEvent(event); } void ItemView::mousePressEvent(QMouseEvent *event) { if(!indexAt(event->pos()).isValid() && event->button() == Qt::LeftButton) { d->pressedPos = event->pos(); setState(QAbstractItemView::DragSelectingState); } else { d->pressedPos = QPoint(); } QAbstractItemView::mousePressEvent(event); } void ItemView::mouseReleaseEvent(QMouseEvent *event) { if(d->rubberBand.isValid()) { viewport()->update(d->rubberBand); d->rubberBand = QRect(); d->pressedPos = QPoint(); setState(QAbstractItemView::NoState); } if(d->backArrowRect().contains(event->pos()) && rootIndex() != QModelIndex()) { open(rootIndex().parent()); } QAbstractItemView::mouseReleaseEvent(event); } void ItemView::wheelEvent(QWheelEvent *event) { if(event->orientation() != Qt::Vertical) { QAbstractItemView::wheelEvent(event); return; } int degrees = event->delta() / 8; int steps = degrees / 15; steps *= d->wheelScrollLines; d->scrollBarValue -= steps * verticalScrollBar()->singleStep(); if(d->scrollBarValue < verticalScrollBar()->minimum()) d->scrollBarValue = verticalScrollBar()->minimum(); if(d->scrollBarValue > verticalScrollBar()->maximum()) d->scrollBarValue = verticalScrollBar()->maximum(); if(d->scrollTimeLine->state() == QTimeLine::Running) { d->scrollTimeLine->stop(); } d->scrollTimeLine->setFrameRange(verticalScrollBar()->value(), d->scrollBarValue); d->scrollTimeLine->start(); } void ItemView::keyPressEvent(QKeyEvent *event) { if(event->key() == Qt::Key_Backspace) { if(rootIndex().isValid()) { open(model()->parent(rootIndex())); } } else if(event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) { open(currentIndex()); } else { QAbstractItemView::keyPressEvent(event); } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////PRIVATE/////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ItemView::Private::Private(ItemView *view) :q(view) ,backArrowHover(false) ,itemsPerRow(1) ,animationTimeLine(new QTimeLine()) ,dragEnterTimer(new QTimer()) ,showToolTips(false) ,goBack(false) ,scrollTimeLine(new QTimeLine()) ,scrollBarValue(0) { dragEnterTimer->setSingleShot(true); animationTimeLine->setDuration(ANIMATION_TIME); animationTimeLine->setDirection(QTimeLine::Backward); scrollTimeLine->setDuration(ANIMATION_TIME); } ItemView::Private::~Private() { delete animationTimeLine; delete dragEnterTimer; delete scrollTimeLine; } void ItemView::Private::drawBackArrow(QPainter *painter, QStyle::State state) const { painter->save(); painter->setOpacity(painter->opacity() * 0.5); if (state & QStyle::State_MouseOver) { painter->setBrush(q->palette().highlight()); } else { painter->setBrush(q->palette().mid()); } QRect rect = backArrowRect(); // background painter->setPen(Qt::NoPen); painter->drawRect(rect); painter->setPen(QPen(q->palette().dark(), 0)); painter->drawLine (rect.topRight() + QPointF(0.5, 0), rect.bottomRight() + QPointF(0.5, 0)); painter->setPen(Qt::NoPen); if (state & QStyle::State_MouseOver) { painter->setBrush(q->palette().highlightedText()); } else { painter->setBrush(q->palette().light()); } painter->translate(rect.center()); painter->drawPath(trianglePath()); painter->resetTransform(); painter->restore(); } QRect ItemView::Private::backArrowRect() const { return QRect(0, 0, BACK_ARROW_WIDTH, q->viewport()->height()); } void ItemView::Private::updateScrollBarRange() { int childCount = q->model()->rowCount(q->rootIndex()); int pageSize = q->viewport()->height(); int rowHeight = gridSize.height(); int rows = qCeil((qreal)childCount / (qreal)itemsPerRow); q->verticalScrollBar()->setRange(0, (rowHeight * rows) - pageSize); q->verticalScrollBar()->setPageStep(pageSize); q->verticalScrollBar()->setSingleStep(rowHeight); } QPainterPath ItemView::Private::trianglePath(qreal width, qreal height) const { QPainterPath path(QPointF(-width/2,0.0)); path.lineTo(width,-height/2); path.lineTo(width,height/2); path.lineTo(-width/2,0.0); return path; } #include "itemview.moc" plasma-widget-quickaccess-0.8.1/pluginwidget.h000644 001750 001750 00000003601 11207307040 017617 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef PluginWidget_HEADER #define PluginWidget_HEADER #include "pluginmodel.h" #include "ui_pluginwidgetbase.h" class PluginWidget : public QWidget, private Ui::PluginWidgetBase { Q_OBJECT public: PluginWidget(QWidget* parent = 0, Qt::WindowFlags fl = 0 ); virtual ~PluginWidget(); QStringList activePlugins() const; void setActivePlugins(const QStringList &list); public slots: void toggle(const QModelIndex &); private: PluginModel *m_model; }; #endif //PluginWidget_HEADER plasma-widget-quickaccess-0.8.1/iconmanager.h000644 001750 001750 00000014150 11207307040 017401 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Peter Penz * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef ICONMANAGER_H #define ICONMANAGER_H #include #include #include #include #include class DirModel; class KDirSortFilterProxyModel; class KJob; class KMimeTypeResolver; class QAbstractItemView; /** * @brief Manages the icon state of a directory model. * * Per default a preview is generated for each item. * Additionally the clipboard is checked for cut items. * The icon state for cut items gets dimmed automatically. * * The following strategy is used when creating previews: * - The previews for currently visible items are created before * the previews for invisible items. * - If the user changes the visible area by using the scrollbars, * all pending previews get paused. As soon as the user stays * on the same position for a short delay, the previews are * resumed. Also in this case the previews for the visible items * are generated first. */ class IconManager : public QObject { Q_OBJECT public: IconManager(QAbstractItemView* parent, KDirSortFilterProxyModel* model); virtual ~IconManager(); void setShowPreview(bool show); bool showPreview() const; void setPreviewPlugins(const QStringList &list); /** * Updates the previews for all already available items. It is only necessary * to invoke this method when the icon size of the abstract item view has * been changed. */ void updatePreviews(); /** * Cancels all pending previews. Should be invoked when the URL of the item * view has been changed. */ void cancelPreviews(); private slots: /** * Generates previews for the items \a items asynchronously. */ void generatePreviews(const KFileItemList& items); /** * Adds the preview \a pixmap for the item \a item to the preview * queue and starts a timer which will dispatch the preview queue * later. */ void addToPreviewQueue(const KFileItem& item, const QPixmap& pixmap); /** * Is invoked when the preview job has been finished and * removes the job from the m_previewJobs list. */ void slotPreviewJobFinished(KJob* job); /** * Dispatches the preview queue block by block within * time slices. */ void dispatchPreviewQueue(); /** * Pauses all preview jobs and invokes IconManager::resumePreviews() * after a short delay. Is invoked as soon as the user has moved * a scrollbar. */ void pausePreviews(); /** * Resumes the previews that have been paused after moving the * scrollbar. The previews for the current visible area are * generated first. */ void resumePreviews(); private: /** * Replaces the icon of the item with the \a url by the preview pixmap * \a pixmap. */ void replaceIcon(const KUrl& url, const QPixmap& pixmap); /** * Applies a frame around the icon. False is returned if * no frame has been added because the icon is too small. */ bool applyImageFrame(QPixmap& icon); /** * Resizes the icon to \a maxSize if the icon size does not * fit into the maximum size. The aspect ratio of the icon * is kept. */ void limitToSize(QPixmap& icon, const QSize& maxSize); /** * Starts a new preview job for the items \a to m_previewJobs * and triggers the preview timer. */ void startPreviewJob(const KFileItemList& items); /** Kills all ongoing preview jobs. */ void killPreviewJobs(); /** * Orders the items \a items in a way that the visible items * are moved to the front of the list. When passing this * list to a preview job, the visible items will get generated * first. */ void orderItems(KFileItemList& items); private: /** Remembers the pixmap for an item specified by an URL. */ struct ItemInfo { KUrl url; QPixmap pixmap; }; bool m_showPreview; QStringList m_previewPlugins; /** * True, if m_pendingItems and m_dispatchedItems should be * cleared when the preview jobs have been finished. */ bool m_clearItemQueues; QAbstractItemView* m_view; QTimer* m_previewTimer; QTimer* m_scrollAreaTimer; QList m_previewJobs; DirModel* m_model; KDirSortFilterProxyModel* m_proxyModel; KMimeTypeResolver* m_mimeTypeResolver; QList m_previews; /** * Contains all items where a preview must be generated, but * where the preview job has not dispatched the items yet. */ KFileItemList m_pendingItems; /** * Contains all items, where a preview has already been * generated by the preview jobs. */ KFileItemList m_dispatchedItems; }; inline bool IconManager::showPreview() const { return m_showPreview; } #endif plasma-widget-quickaccess-0.8.1/pluginmodel.cpp000644 001750 001750 00000006430 11207307040 017772 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #include #include #include #include "pluginmodel.h" class PluginModelPrivate { public: PluginModelPrivate(); ~PluginModelPrivate(); QList pluginList; }; PluginModel::PluginModel(QObject *parent) :QAbstractListModel(parent) ,d(new PluginModelPrivate()) { } PluginModel::~PluginModel() { delete d; } Plugin* PluginModel::plugin(const QModelIndex &index) { return d->pluginList.at(index.row()); } Plugin* PluginModel::plugin(int row) { return d->pluginList.at(row); } int PluginModel::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent); return d->pluginList.count(); } QVariant PluginModel::data(const QModelIndex &index, int role)const { switch(role) { case Qt::DisplayRole: return d->pluginList.at(index.row())->prettyName; case Qt::DecorationRole: if(d->pluginList.at(index.row())->active) return KIcon("dialog-ok"); return KIcon("dialog-cancel"); default: return QVariant(); } } Qt::ItemFlags PluginModel::flags(const QModelIndex &index) const { Qt::ItemFlags flags = Qt::ItemIsEnabled; if(index.isValid()) { return flags; } return Qt::ItemIsUserCheckable | flags; } QModelIndex PluginModel::index(int row, int column, const QModelIndex &parent) const { Q_UNUSED(parent); if (row < 0 || column != 0) return QModelIndex(); if (row >= d->pluginList.count()) return QModelIndex(); return createIndex(row, 0, d->pluginList.at(row)); } ///////////PRIVATE//////////////////////////////////// PluginModelPrivate::PluginModelPrivate() { QStringList list = KIO::PreviewJob::availablePlugins(); for (int i = 0; i < list.size(); ++i) { QString name = list.at(i); Plugin *plugin = new Plugin(); plugin->name = name; plugin->prettyName = name.remove("thumbnail"); pluginList.append(plugin); } } PluginModelPrivate::~PluginModelPrivate() { qDeleteAll(pluginList); } plasma-widget-quickaccess-0.8.1/plasma-applet-quickaccess.desktop000644 001750 001750 00000001227 11207340217 023400 0ustar00000000 000000 [Desktop Entry] Name=Quick Access Comment=A menu that lists files in a given folder Type=Service Icon=folder-favorites Name[de]=Schnellzugriff Comment[de]=Ein Menü, das den Inhalt eines bestimmten Ordners anzeigt. X-KDE-ServiceTypes=Plasma/Applet X-KDE-Library=plasma_applet_quickaccess X-KDE-PluginInfo-Author=Mark Herbert X-KDE-PluginInfo-Email=wirrkpf@googlemail.com X-KDE-PluginInfo-Name=quickaccess X-KDE-PluginInfo-Version=0.8.1 X-KDE-PluginInfo-Website=http://www.kde-look.org/content/show.php/QuickAccess?content=84128 X-KDE-PluginInfo-Category=File System X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-EnabledByDefault=true plasma-widget-quickaccess-0.8.1/pluginwidgetbase.ui000644 001750 001750 00000000771 11207307040 020645 0ustar00000000 000000 PluginWidgetBase 0 0 400 256 Form plasma-widget-quickaccess-0.8.1/Messages.sh000755 001750 001750 00000000165 11207307040 017054 0ustar00000000 000000 #! /usr/bin/env bash $EXTRACTRC *.ui >> rc.cpp $XGETTEXT *.cpp -o $podir/plasma_applet_quickaccess.pot rm -rf rc.cpp plasma-widget-quickaccess-0.8.1/CMakeLists.txt000644 001750 001750 00000002235 11207307040 017506 0ustar00000000 000000 # Project Needs a name ofcourse project(quickaccess) # Find the required Libaries find_package(KDE4 REQUIRED) include(KDE4Defaults) add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ) # Add translations include(MacroOptionalAddSubdirectory) macro_optional_add_subdirectory( po ) # We add our source code here set(quickaccess_SRCS quickaccess.cpp popupdialog.cpp itemview.cpp pluginwidget.cpp effects.cpp button.cpp dirmodel.cpp label.cpp iconmanager.cpp resizedialog.cpp settings.cpp pluginmodel.cpp) # Now make sure all files get to the right place kde4_add_ui_files(quickaccess_SRCS quickaccessGeneralConfig.ui quickaccessAppearanceConfig.ui quickaccessPreviewConfig.ui pluginwidgetbase.ui) kde4_add_plugin(plasma_applet_quickaccess ${quickaccess_SRCS}) target_link_libraries(plasma_applet_quickaccess ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} kfile konq) install(TARGETS plasma_applet_quickaccess DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES plasma-applet-quickaccess.desktop DESTINATION ${SERVICES_INSTALL_DIR})plasma-widget-quickaccess-0.8.1/dirmodel.cpp000644 001750 001750 00000003642 11207307040 017254 0ustar00000000 000000 /*************************************************************************** * Copyright (C) 2008 by Mark Herbert * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * 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., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ //KDE includes //#include #include //locale includes #include "dirmodel.h" DirModel::DirModel(QObject * parent ) :KDirModel( parent ) { } QVariant DirModel::data( const QModelIndex & index, int role ) const { if (role != Qt::DisplayRole) { return KDirModel::data(index, role); } KFileItem item = itemForIndex(index); if(item.isDesktopFile()) { KDesktopFile f(item.url().path()); QString name = f.readName(); if(!name.isEmpty()){ return name; } } return item.text(); } #include "dirmodel.moc"